portage._doebuild_manifest_exempt_depend -= 1
repoman_settings["O"] = checkdir
- if not portage.digestgen([], repoman_settings, myportdb=portdb):
+ if not portage.digestgen(mysettings=repoman_settings, myportdb=portdb):
print("Unable to generate manifest.")
dofail = 1
if options.mode == "manifest":
mydone=[]
if repolevel==3: # In a package dir
repoman_settings["O"] = startdir
- portage.digestgen([], repoman_settings, myportdb=portdb)
+ portage.digestgen(mysettings=repoman_settings, myportdb=portdb)
elif repolevel==2: # In a category dir
for x in myfiles:
xs=x.split("/")
repoman_settings["O"] = os.path.join(startdir, xs[0])
if not os.path.isdir(repoman_settings["O"]):
continue
- portage.digestgen([], repoman_settings, myportdb=portdb)
+ portage.digestgen(mysettings=repoman_settings, myportdb=portdb)
elif repolevel==1: # repo-cvsroot
print(green("RepoMan sez:"), "\"You're rather crazy... doing the entire repository.\"\n")
for x in myfiles:
repoman_settings["O"] = os.path.join(startdir, xs[0], xs[1])
if not os.path.isdir(repoman_settings["O"]):
continue
- portage.digestgen([], repoman_settings, myportdb=portdb)
+ portage.digestgen(mysettings=repoman_settings, myportdb=portdb)
else:
print(red("I'm confused... I don't know where I am!"))
sys.exit(1)
return retval >> 8
return retval
-def digestgen(myarchives, mysettings, overwrite=None, manifestonly=None, myportdb=None):
+def digestgen(myarchives=None, mysettings=None,
+ overwrite=None, manifestonly=None, myportdb=None):
"""
Generates a digest file if missing. Fetches files if necessary.
+ NOTE: myarchives and mysettings used to be positional arguments,
+ so their order must be preserved for backward compatibility.
+ @param mysettings: the ebuild config (mysettings["O"] must correspond
+ to the ebuild's parent directory)
+ @type mysettings: config
+ @param myportdb: a portdbapi instance
+ @type myportdb: portdbapi
+ @rtype: int
+ @returns: 1 on success and 0 on failure
"""
+ if mysettings is None:
+ raise TypeError("portage.digestgen(): missing" + \
+ " required 'mysettings' parameter")
if myportdb is None:
warnings.warn("portage.digestgen() called without 'myportdb' parameter",
DeprecationWarning, stacklevel=2)
return 0
writemsg_stdout(_(">>> Creating Manifest for %s\n") % mysettings["O"])
try:
- mf.create(requiredDistfiles=myarchives,
- assumeDistHashesSometimes=True,
+ mf.create(assumeDistHashesSometimes=True,
assumeDistHashesAlways=(
"assume-digests" in mysettings.features))
except portage.exception.FileNotFound as e:
try:
if mydo == "manifest":
- return not digestgen(aalist, mysettings, myportdb=mydbapi)
+ return not digestgen(mysettings=mysettings, myportdb=mydbapi)
elif mydo == "digest":
- return not digestgen(aalist, mysettings, myportdb=mydbapi)
+ return not digestgen(mysettings=mysettings, myportdb=mydbapi)
elif mydo != 'fetch' and not emerge_skip_digest and \
"digest" in mysettings.features:
# Don't do this when called by emerge or when called just
# for fetch (especially parallel-fetch) since it's not needed
# and it can interfere with parallel tasks.
- digestgen(aalist, mysettings, myportdb=mydbapi)
+ digestgen(mysettings=mysettings, myportdb=mydbapi)
except portage.exception.PermissionDenied as e:
writemsg(_("!!! Permission Denied: %s\n") % (e,), noiselevel=-1)
if mydo in ("digest", "manifest"):