From 2b65a8b52aeae8bc61c45264368571e93b70618c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 11 Oct 2006 06:56:47 +0000 Subject: For bug #150121, generate an error in digestcheck() if a file is found that is not listed in the Manifest. svn path=/main/trunk/; revision=4655 --- pym/portage.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pym/portage.py b/pym/portage.py index b28aca245..832e49d0f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2435,6 +2435,22 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0): writemsg("!!! Got: %s\n" % e.value[2], noiselevel=-1) writemsg("!!! Expected: %s\n" % e.value[3], noiselevel=-1) return 0 + """ epatch will just grab all the patches out of a directory, so we have to + make sure there aren't any foreign files that it might grab.""" + filesdir = os.path.join(pkgdir, "files") + for parent, dirs, files in os.walk(filesdir): + for d in dirs: + if d.startswith(".") or d == "CVS": + dirs.remove(d) + for f in files: + if f.startswith("."): + continue + f = os.path.join(parent, f)[len(filesdir) + 1:] + file_type = mf.findFile(f) + if file_type != "AUX" and not f.startswith("digest-"): + writemsg("!!! A file is not listed in the Manifest: '%s'\n" % \ + os.path.join(filesdir, f), noiselevel=-1) + return 0 return 1 # parse actionmap to spawn ebuild with the appropriate args -- cgit v1.2.3-1-g7c22