class EbuildFetcher(SpawnProcess):
- __slots__ = ("fetchonly", "pkg",)
+ __slots__ = ("fetchonly", "fetchall", "pkg",)
def _start(self):
portdb = root_config.trees["porttree"].dbapi
ebuild_path = portdb.findname(self.pkg.cpv)
settings = root_config.settings
+ phase = "fetch"
+ if self.fetchall:
+ phase = "fetchall"
fetch_env = dict(settings.iteritems())
fetch_env["PORTAGE_NICENESS"] = "0"
ebuild_binary = os.path.join(
settings["PORTAGE_BIN_PATH"], "ebuild")
- fetch_args = [ebuild_binary, ebuild_path, "fetch"]
+ fetch_args = [ebuild_binary, ebuild_path, phase]
debug = settings.get("PORTAGE_DEBUG") == "1"
if debug:
fetch_args.append("--debug")
if self.background:
fetch_log = self.scheduler.fetch.log_file
- fetcher = EbuildFetcher(fetchonly=opts.fetchonly,
+ fetcher = EbuildFetcher(fetchall=opts.fetch_all_uri,
+ fetchonly=opts.fetchonly,
background=self.background, logfile=fetch_log,
pkg=pkg, scheduler=self.scheduler)
"--usepkg", "--usepkgonly"):
myopts.pop(opt, None)
+ if "--fetch-all-uri" in myopts:
+ myopts["--fetchonly"] = True
+
if "--skipfirst" in myopts and "--resume" not in myopts:
myopts["--resume"] = True
clean_phases = ("clean", "cleanrm")
validcommands = ["help","clean","prerm","postrm","cleanrm","preinst","postinst",
- "config","info","setup","depend","fetch","digest",
+ "config", "info", "setup", "depend",
+ "fetch", "fetchall", "digest",
"unpack","compile","test","install","rpm","qmerge","merge",
"package","unmerge", "manifest"]
writemsg("\n", noiselevel=-1)
return 1
+ if mydo == "fetchall":
+ fetchall = 1
+ mydo = "fetch"
+
if mydo not in clean_phases and not os.path.exists(myebuild):
writemsg("!!! doebuild: %s not found for %s\n" % (myebuild, mydo),
noiselevel=-1)