Bug #229033 - When a Manifest is added automatically by repoman, it's in the
authorZac Medico <zmedico@gentoo.org>
Tue, 14 Oct 2008 22:14:05 +0000 (22:14 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 14 Oct 2008 22:14:05 +0000 (22:14 -0000)
"mynew" list, so move manifest paths from that list to the "mymanifests" list
when necessary.

svn path=/main/trunk/; revision=11692

bin/repoman

index 5c2f03a56805fdb09c3ce6c869b2547cdd97b066..f7831cf503fb1cef1339c51891aa2a6a9b5c0a2a 100755 (executable)
@@ -1738,8 +1738,23 @@ else:
 
        # Manifests need to be regenerated after all other commits, so don't commit
        # them now even if they have changed.
-       mymanifests = [f for f in mychanged if "Manifest" == os.path.basename(f)]
-       mychanged = [f for f in mychanged if "Manifest" != os.path.basename(f)]
+       mymanifests = set()
+       changed_set = set()
+       new_set = set()
+       for f in mychanged:
+               if "Manifest" == os.path.basename(f):
+                       mymanifests.add(f)
+               else:
+                       changed_set.add(f)
+       for f in mynew:
+               if "Manifest" == os.path.basename(f):
+                       mymanifests.add(f)
+               else:
+                       new_set.add(f)
+       mychanged = list(changed_set)
+       mynew =  list(new_set)
+       mymanifests = list(mymanifests)
+       del changed_set, new_set
        myupdates = mychanged + mynew
        myheaders = []
        mydirty = []