For bug #143340, give an appropriate message when there is no read access to a binary...
authorZac Medico <zmedico@gentoo.org>
Tue, 19 Jun 2007 21:39:51 +0000 (21:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 19 Jun 2007 21:39:51 +0000 (21:39 -0000)
svn path=/main/branches/2.1.2/; revision=6878

pym/portage.py

index bbbc6312b3d972d1c16dc66f97d33c515fd706ab..7558a7b82bae53ea9dd52b619dc005884d9af323 100644 (file)
@@ -6587,6 +6587,12 @@ class binarytree(object):
                                        full_path = os.path.join(self.pkgdir, mypath)
                                        if os.path.islink(full_path):
                                                continue
+                                       if not os.access(full_path, os.R_OK):
+                                               writemsg("!!! Permission denied to read " + \
+                                                       "binary package: '%s'\n" % full_path,
+                                                       noiselevel=-1)
+                                               self.invalids.append(myfile[:-5])
+                                               continue
                                        mytbz2 = xpak.tbz2(full_path)
                                        # For invalid packages, mycat could be None.
                                        mycat = mytbz2.getfile("CATEGORY")