For bug #163219, handle binpkgs that have missing PF metadata.
authorZac Medico <zmedico@gentoo.org>
Mon, 22 Jan 2007 11:24:45 +0000 (11:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 22 Jan 2007 11:24:45 +0000 (11:24 -0000)
svn path=/main/trunk/; revision=5757

pym/portage.py

index 8d30da9c45f4e4f597d194bafcdbf087c70182f1..c4dce04ac9c27baf85119d214be79d1b48b65da1 100644 (file)
@@ -6518,8 +6518,9 @@ class binarytree(object):
                                        mytbz2 = xpak.tbz2(full_path)
                                        # For invalid packages, mycat could be None.
                                        mycat = mytbz2.getfile("CATEGORY")
+                                       mypf = mytbz2.getfile("PF")
                                        mypkg = myfile[:-5]
-                                       if not mycat:
+                                       if not mycat or not mypf:
                                                #old-style or corrupt package
                                                writemsg("!!! Invalid binary package: '%s'\n" % full_path,
                                                        noiselevel=-1)
@@ -6531,7 +6532,7 @@ class binarytree(object):
                                        mycat = mycat.strip()
                                        if mycat != mydir and mydir != "All":
                                                continue
-                                       if mypkg != mytbz2.getfile("PF").strip():
+                                       if mypkg != mypf.strip():
                                                continue
                                        mycpv = mycat + "/" + mypkg
                                        if mycpv in pkg_paths: