summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-04-11 03:20:55 +0000
committerZac Medico <zmedico@gentoo.org>2006-04-11 03:20:55 +0000
commita0cbe44a960c000c040560558abc8a7f480fcdf9 (patch)
tree5b1226540c2030388864a6a277a55f62d0bd512b
parentb5091637019971ba1ce9eefdb20c0692bca9f041 (diff)
downloadportage-a0cbe44a960c000c040560558abc8a7f480fcdf9.tar.gz
portage-a0cbe44a960c000c040560558abc8a7f480fcdf9.tar.bz2
portage-a0cbe44a960c000c040560558abc8a7f480fcdf9.zip
Remove dead code from portage.digestcheck().
svn path=/main/trunk/; revision=3124
-rw-r--r--pym/portage.py86
1 files changed, 0 insertions, 86 deletions
diff --git a/pym/portage.py b/pym/portage.py
index f47cac76e..a3cb17079 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2187,92 +2187,6 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0):
print red("!!! ")+"Expected: "+str(e.value[3])
return 0
return 1
-
- #########################################
- # Old code that's replaced by the above #
- #########################################
-
- # archive files
- basedir=mysettings["DISTDIR"]+"/"
- digestfn=mysettings["FILESDIR"]+"/digest-"+mysettings["PF"]
-
- # portage files -- p(ortagefiles)basedir
- pbasedir=mysettings["O"]+"/"
- manifestfn=pbasedir+"Manifest"
-
- if not (os.path.exists(digestfn) and os.path.exists(manifestfn)):
- if "digest" in features:
- print ">>> No package digest/Manifest file found."
- print ">>> \"digest\" mode enabled; auto-generating new digest..."
- return digestgen(myfiles,mysettings)
- else:
- if not os.path.exists(manifestfn):
- if strict:
- print red("!!! No package manifest found:"),manifestfn
- return 0
- else:
- print "--- No package manifest found:",manifestfn
- if not os.path.exists(digestfn):
- print "!!! No package digest file found:",digestfn
- print "!!! Type \"ebuild foo.ebuild digest\" to generate it."
- return 0
-
- mydigests=digestParseFile(digestfn)
- if mydigests is None:
- print "!!! Failed to parse digest file:",digestfn
- return 0
- mymdigests=digestParseFile(manifestfn)
- if "strict" not in features:
- # XXX: Remove this when manifests become mainstream.
- pass
- elif mymdigests is None:
- print "!!! Failed to parse manifest file:",manifestfn
- if strict:
- return 0
- else:
- # Check the portage-related files here.
- mymfiles=listdir(pbasedir,recursive=1,filesonly=1,ignorecvs=1,EmptyOnError=1)
- manifest_files = mymdigests.keys()
- # Files unrelated to the build process are ignored for verification by default
- for x in ["Manifest", "ChangeLog", "metadata.xml"]:
- while x in mymfiles:
- mymfiles.remove(x)
- while x in manifest_files:
- manifest_files.remove(x)
- for x in range(len(mymfiles)-1,-1,-1):
- if mymfiles[x] in manifest_files:
- manifest_files.remove(mymfiles[x])
- elif len(cvstree.apply_cvsignore_filter([mymfiles[x]]))==0:
- # we filter here, rather then above; manifest might have files flagged by the filter.
- # if something is returned, then it's flagged as a bad file
- # manifest doesn't know about it, so we kill it here.
- del mymfiles[x]
- else:
- print red("!!! Security Violation: A file exists that is not in the manifest.")
- print "!!! File:",mymfiles[x]
- if strict:
- return 0
- if manifest_files and strict:
- print red("!!! Files listed in the manifest do not exist!")
- for x in manifest_files:
- print x
- return 0
-
- if not digestCheckFiles(mymfiles, mymdigests, pbasedir, note="files ", strict=strict):
- if strict:
- print ">>> Please ensure you have sync'd properly. Please try '"+bold("emerge sync")+"' and"
- print ">>> optionally examine the file(s) for corruption. "+bold("A sync will fix most cases.")
- print
- return 0
- else:
- print "--- Manifest check failed. 'strict' not enabled; ignoring."
- print
-
- if justmanifest:
- return 1
-
- # Just return the status, as it's the last check.
- return digestCheckFiles(myfiles, mydigests, basedir, note="src_uri", strict=strict)
# parse actionmap to spawn ebuild with the appropriate args
def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None):