From: Zac Medico Date: Mon, 17 Jan 2011 19:06:02 +0000 (-0800) Subject: spawn_nofetch: Ensure $A is defined. X-Git-Tag: v2.2.0_alpha16~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3c855b259da77cf131be0045340ba63ac1b44a25;p=portage.git spawn_nofetch: Ensure $A is defined. This will fix bug #351505. --- diff --git a/pym/portage/package/ebuild/_spawn_nofetch.py b/pym/portage/package/ebuild/_spawn_nofetch.py index 9ae801050..1678faf56 100644 --- a/pym/portage/package/ebuild/_spawn_nofetch.py +++ b/pym/portage/package/ebuild/_spawn_nofetch.py @@ -1,4 +1,4 @@ -# Copyright 2010 Gentoo Foundation +# Copyright 2010-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import shutil @@ -60,6 +60,12 @@ def spawn_nofetch(portdb, ebuild_path, settings=None): try: doebuild_environment(ebuild_path, 'nofetch', settings=settings, db=portdb) + if "A" not in settings.configdict["pkg"]: + mytree = os.path.dirname(os.path.dirname( + os.path.dirname(ebuild_path))) + fetch_map = portdb.getFetchMap(settings.mycpv, + useflags=settings["PORTAGE_USE"].split(), mytree=mytree) + settings.configdict["pkg"]["A"] = " ".join(fetch_map) restrict = settings['PORTAGE_RESTRICT'].split() defined_phases = settings['DEFINED_PHASES'].split() if not defined_phases: