diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-11-26 00:41:03 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-11-26 00:41:03 +0000 |
commit | c33e4a9108927eba31cb16ea1947437eb4477ce8 (patch) | |
tree | b7f4b410c65f2c8f9561fbdb1c066f2068b9be02 | |
parent | caf911f9e0dfa704f6a24116d8cdbbb58fcbe5a6 (diff) | |
download | portage-c33e4a9108927eba31cb16ea1947437eb4477ce8.tar.gz portage-c33e4a9108927eba31cb16ea1947437eb4477ce8.tar.bz2 portage-c33e4a9108927eba31cb16ea1947437eb4477ce8.zip |
Bug #248782 - Handle permission error in EbuildFetchonly.execute() if PORTAGE_TMPDIR
is not writable.
svn path=/main/trunk/; revision=12092
-rw-r--r-- | pym/_emerge/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 5679715e7..2d7c05eb8 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1605,7 +1605,12 @@ class EbuildFetchonly(SlotObject): settings = self.settings global_tmpdir = settings["PORTAGE_TMPDIR"] from tempfile import mkdtemp - private_tmpdir = mkdtemp("", "._portage_fetch_.", global_tmpdir) + try: + private_tmpdir = mkdtemp("", "._portage_fetch_.", global_tmpdir) + except OSError, e: + if e.errno != portage.exception.PermissionDenied.errno: + raise + raise portage.exception.PermissionDenied(global_tmpdir) settings["PORTAGE_TMPDIR"] = private_tmpdir settings.backup_changes("PORTAGE_TMPDIR") try: |