portdb = root_config.trees["porttree"].dbapi
ebuild_path = portdb.findname(pkg.cpv)
debug = settings.get("PORTAGE_DEBUG") == "1"
- portage.prepare_build_dirs(self.pkg.root, self.settings, 0)
-
retval = portage.doebuild(ebuild_path, "fetch",
self.settings["ROOT"], self.settings, debug=debug,
listonly=self.pretend, fetchonly=1, fetchall=self.fetch_all,
logfile=None, returnpid=returnpid)
return retval
+ restrict = set(mysettings.get('PORTAGE_RESTRICT', '').split())
# get possible slot information from the deps file
if mydo == "depend":
writemsg("!!! DEBUG: dbkey: %s\n" % str(dbkey), 2)
mysettings["PF"], myroot, mysettings, vartree=vartree)
# Build directory creation isn't required for any of these.
+ # In the fetch phase, the directory is needed only for RESTRICT=fetch
+ # in order to satisfy the sane $PWD requirement (from bug #239560)
+ # when pkg_nofetch is spawned.
have_build_dirs = False
- if not parallel_fetchonly and mydo not in ("digest", "help", "manifest"):
+ if not parallel_fetchonly and \
+ mydo not in ('digest', 'help', 'manifest') and \
+ not (mydo == 'fetch' and 'fetch' not in restrict):
mystatus = prepare_build_dirs(myroot, mysettings, cleanup)
if mystatus:
return mystatus