For bug #143340, give an appropriate message when there is no read access to a binary...
authorZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 04:23:08 +0000 (04:23 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 04:23:08 +0000 (04:23 -0000)
svn path=/main/branches/2.1.2.9/; revision=7467

pym/portage.py

index 5bc2f22d8ee5653fbe54b97d50c6d693e38edf94..0b6e3195e6f8b76117762a2115a85585506eb796 100644 (file)
@@ -6619,6 +6619,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")