From d6e2d02e9fbedbe55c31859f0feb24b0161d7469 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 18 Feb 2009 05:33:19 +0100
Subject: [PATCH] requiredby: don't add dups.

--HG--
extra : convert_revision : a883cf0a080e99120b3e17a8836b132ff94079f0
---
 lib/requiredby.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/requiredby.c b/lib/requiredby.c
index 60e187fcd0..4aca53d179 100644
--- a/lib/requiredby.c
+++ b/lib/requiredby.c
@@ -49,6 +49,9 @@ add_pkg_into_requiredby(prop_dictionary_t pkgd, const char *reqname)
 			return ENOMEM;
 	}
 
+	if (xbps_find_string_in_array(array, reqname))
+		return EEXIST;
+
 	reqstr = prop_string_create_cstring(reqname);
 	if (reqstr == NULL) {
 		if (alloc)