Make repoman work with both + and - flags in IUSE.
authorZac Medico <zmedico@gentoo.org>
Sun, 10 Jun 2007 10:22:47 +0000 (10:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 10 Jun 2007 10:22:47 +0000 (10:22 -0000)
svn path=/main/trunk/; revision=6788

bin/repoman

index 9b7a21d6ca1a8067325fa364123ca07583182722..5f7160024d89b4c24c8ce5d7150f9ad7b2fb05a0 100755 (executable)
@@ -1294,13 +1294,12 @@ for x in scanlist:
                myuse = []
                default_use = []
                for myflag in myaux["IUSE"].split():
-                       if myflag.startswith("+"):
+                       flag_name = myflag.lstrip("+-")
+                       if myflag != flag_name:
                                default_use.append(myflag)
-                               myflag = myflag[1:]
-                       myuse.append(myflag)
-               for mypos in range(len(myuse)-1,-1,-1):
-                       if myuse[mypos] and (myuse[mypos] in uselist):
-                               del myuse[mypos]
+                       if flag_name not in uselist:
+                               myuse.append(flag_name)
+
                # uselist checks - local
                mykey = portage.dep_getkey(catpkg)
                if luselist.has_key(mykey):