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:37:02 +0000 (21:37 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 19 Jun 2007 21:37:02 +0000 (21:37 -0000)
svn path=/main/trunk/; revision=6877

pym/portage/dbapi/bintree.py

index 7fb58748f0b40c0486e84fdf5524fb93b4e4b22e..713a8c612738e0098197af460be2193574487132 100644 (file)
@@ -429,6 +429,12 @@ class binarytree(object):
                                                                        aux_cache[k] = d[k]
                                                                self.dbapi._aux_cache[mycpv] = aux_cache
                                                        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 = portage.xpak.tbz2(full_path)
                                        # For invalid packages, mycat could be None.
                                        mycat = mytbz2.getfile("CATEGORY")