Thanks to jforman for finding this one, emerge was not helpful when permissions on...
authorAlec Warner <antarus@gentoo.org>
Fri, 7 Apr 2006 16:55:37 +0000 (16:55 -0000)
committerAlec Warner <antarus@gentoo.org>
Fri, 7 Apr 2006 16:55:37 +0000 (16:55 -0000)
svn path=/main/trunk/; revision=3089

bin/emerge

index 4dbcfd76dbeaf2fc7292053119967274bbc6f0e2..95f8660636dff381b50532eca79e9e52168093ca 100755 (executable)
@@ -6,6 +6,7 @@
 import os,sys
 os.environ["PORTAGE_CALLER"]="emerge"
 sys.path = ["/usr/lib/portage/pym"]+sys.path
+import errno
 
 try:
        import portage
@@ -846,9 +847,14 @@ def getlist(mode):
                except OSError:
                        print "!!! Couldn't open "+pfile+"; exiting."
                        sys.exit(1)
-               except IOError:
-                       #world file doesn't exist
-                       mylines=[]
+               except IOError, e:
+                       #Permission denied is a fatal error, as opposed to a missing file
+                       if e.errno == errno.EACCES:
+                               raise
+                       else:
+                               if "--quiet" not in myopts:
+                                       portage.writemsg(red("\n!!! ") + "Warning %s does not exist.\n" % os.path.join(portage.root, portage.WORLD_FILE) )
+                               mylines=[]
        mynewlines=[]
        for x in mylines:
                myline=string.join(string.split(x))