From: Zac Medico Date: Wed, 26 Nov 2008 00:41:03 +0000 (-0000) Subject: Bug #248782 - Handle permission error in EbuildFetchonly.execute() if PORTAGE_TMPDIR X-Git-Tag: v2.2_rc17~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c33e4a9108927eba31cb16ea1947437eb4477ce8;p=portage.git Bug #248782 - Handle permission error in EbuildFetchonly.execute() if PORTAGE_TMPDIR is not writable. svn path=/main/trunk/; revision=12092 --- 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: