Fix broken file list handling for FEATUES=sign when only the Manifest has changed.
authorZac Medico <zmedico@gentoo.org>
Thu, 22 Feb 2007 13:09:55 +0000 (13:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 22 Feb 2007 13:09:55 +0000 (13:09 -0000)
svn path=/main/trunk/; revision=6035

bin/repoman

index b599f9111b4c2a46fdf962ef0747685e6aa32f16..7006620b036b0669c6e4bc50a7e948706e249f44 100755 (executable)
@@ -1551,6 +1551,7 @@ 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)]
        myupdates=mychanged+mynew
        myheaders=[]
@@ -1717,6 +1718,7 @@ else:
        signed = False
        if "sign" in repoman_settings.features:
                signed = True
+               myfiles = myupdates + myremoved + mymanifests
                try:
                        if repolevel==3:   # In a package dir
                                repoman_settings["O"] = "."
@@ -1725,6 +1727,8 @@ else:
                                mydone=[]
                                for x in myfiles:
                                        xs=x.split("/")
+                                       if len(xs) < 4-repolevel:
+                                               continue
                                        if xs[0]==".":
                                                xs=xs[1:]
                                        if xs[0] in mydone:
@@ -1737,6 +1741,8 @@ else:
                                mydone=[]
                                for x in myfiles:
                                        xs=x.split("/")
+                                       if len(xs) < 4-repolevel:
+                                               continue
                                        if xs[0]==".":
                                                xs=xs[1:]
                                        if "/".join(xs[:2]) in mydone: