mydone=[]
if repolevel==3: # In a package dir
repoman_settings["O"] = startdir
- portage.digestgen([], repoman_settings, manifestonly=1,
- myportdb=portdb)
+ portage.digestgen([], 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, manifestonly=1,
- myportdb=portdb)
+ portage.digestgen([], 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, manifestonly=1,
- myportdb=portdb)
+ portage.digestgen([], 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=1, manifestonly=0, myportdb=None):
+def digestgen(myarchives, mysettings, overwrite=None, manifestonly=None, myportdb=None):
+ """
+ Generates a digest file if missing. Fetches files if necessary.
"""
- Generates a digest file if missing. Assumes all files are available.
- DEPRECATED: this now only is a compability wrapper for
- portage.manifest.Manifest()
- NOTE: manifestonly and overwrite are useless with manifest2 and
- are therefore ignored."""
if myportdb is None:
- writemsg("Warning: myportdb not specified to digestgen\n")
+ warnings.warn("portage.digestgen() called without 'myportdb' parameter",
+ DeprecationWarning, stacklevel=2)
global portdb
myportdb = portdb
+ if overwrite is not None:
+ warnings.warn("portage.digestgen() called with " + \
+ "deprecated 'overwrite' parameter",
+ DeprecationWarning, stacklevel=2)
+ if manifestonly is not None:
+ warnings.warn("portage.digestgen() called with " + \
+ "deprecated 'manifestonly' parameter",
+ DeprecationWarning, stacklevel=2)
global _doebuild_manifest_exempt_depend
try:
_doebuild_manifest_exempt_depend += 1
try:
if mydo == "manifest":
- return not digestgen(aalist, mysettings, overwrite=1,
- manifestonly=1, myportdb=mydbapi)
+ return not digestgen(aalist, mysettings, myportdb=mydbapi)
elif mydo == "digest":
- return not digestgen(aalist, mysettings, overwrite=1,
- myportdb=mydbapi)
+ return not digestgen(aalist, 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, overwrite=0, myportdb=mydbapi)
+ digestgen(aalist, mysettings, myportdb=mydbapi)
except portage.exception.PermissionDenied as e:
writemsg(_("!!! Permission Denied: %s\n") % (e,), noiselevel=-1)
if mydo in ("digest", "manifest"):