From: Zac Medico Date: Thu, 9 Sep 2010 04:05:32 +0000 (-0700) Subject: Make action_info() validate PORTAGE_TMPDIR since it uses it to solve X-Git-Tag: v2.2_rc79~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0073dd92b6ab1a3e2734c025f86795308ba19bf4;p=portage.git Make action_info() validate PORTAGE_TMPDIR since it uses it to solve bug #336503. --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index d9d0dffe5..5252b4985 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -35,6 +35,7 @@ from portage.output import blue, bold, colorize, create_color_func, darkgreen, \ good = create_color_func("GOOD") bad = create_color_func("BAD") from portage.package.ebuild._ipc.QueryCommand import QueryCommand +from portage.package.ebuild.doebuild import _check_temp_dir from portage._sets import load_default_config, SETPREFIX from portage._sets.base import InternalPackageSet from portage.util import cmp_sort_key, writemsg, \ @@ -1853,6 +1854,12 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): os.makedirs(myportdir,0o755) st = os.stat(myportdir) + # PORTAGE_TMPDIR is used below, so validate it and + # bail out if necessary. + rval = _check_temp_dir(settings) + if rval != os.EX_OK: + return rval + usersync_uid = None spawn_kwargs = {} spawn_kwargs["env"] = settings.environ()