summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-11 06:56:47 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-11 06:56:47 +0000
commit2b65a8b52aeae8bc61c45264368571e93b70618c (patch)
treed1c3f52bc1eea11be37c0059dae08eb6395ff352
parent521dacce2bc7037371e4a8958dc3a7ab3983a9bf (diff)
downloadportage-2b65a8b52aeae8bc61c45264368571e93b70618c.tar.gz
portage-2b65a8b52aeae8bc61c45264368571e93b70618c.tar.bz2
portage-2b65a8b52aeae8bc61c45264368571e93b70618c.zip
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
-rw-r--r--pym/portage.py16
1 files changed, 16 insertions, 0 deletions
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