Merged from trunk 9134:9137
authorFabian Groffen <grobian@gentoo.org>
Thu, 3 Jan 2008 18:56:57 +0000 (18:56 -0000)
committerFabian Groffen <grobian@gentoo.org>
Thu, 3 Jan 2008 18:56:57 +0000 (18:56 -0000)
   | 9135    | Bug #204020 - Make grabfile() properly raise                 |
   | zmedico | PermissionDenied when appropriate instead of silently        |
   |         | ignoring permission errors.                                  |

   | 9137    | Recognize export statements when filtering the environment.  |
   | zmedico | This is needed for compatibility with environment.bz2 files  |
   |         | generated by paludis.                                        |

svn path=/main/branches/prefix/; revision=9139

bin/ebuild.sh
pym/portage/util.py

index 0d596a8a8730c3e8042d65bd975f70fbe3f42a81..ee16b8e485466c9ef121bff2eeb344f9f2d16f2d 100755 (executable)
@@ -1451,7 +1451,7 @@ filter_readonly_variables() {
        done
        set +f
        var_grep=${var_grep:1} # strip the first |
-       var_grep="(^|^declare[[:space:]]+-[^[:space:]]+[[:space:]]+)(${var_grep})=.*"
+       var_grep="(^|^declare[[:space:]]+-[^[:space:]]+[[:space:]]+|^export[[:space:]]+)(${var_grep})=.*"
        # The sed is to remove the readonly attribute from variables such as those
        # listed in READONLY_EBUILD_METADATA, since having any readonly attributes
        # persisting in the saved environment can be inconvenient when it
index db4611814dd9186d72de74702e3a233a3596715a..79f3c2f5d3a39761dc42a659065c84de949910b3 100644 (file)
@@ -281,7 +281,9 @@ def grablines(myfilename,recursive=0):
                        myfile = open(myfilename, "r")
                        mylines = myfile.readlines()
                        myfile.close()
-               except IOError:
+               except IOError, e:
+                       if e.errno == PermissionDenied.errno:
+                               raise PermissionDenied(myfilename)
                        pass
        return mylines