summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-15 23:07:49 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-15 23:07:49 +0000
commitd12e9731958accc6edc86055f5a93a1c9c43ae71 (patch)
treed9fc57f220b96dbbe2ed6b4ea24827b4bbf6ef94
parentf6080d4c042fb5af3fb5c61570d7aa5a647762ac (diff)
downloadportage-d12e9731958accc6edc86055f5a93a1c9c43ae71.tar.gz
portage-d12e9731958accc6edc86055f5a93a1c9c43ae71.tar.bz2
portage-d12e9731958accc6edc86055f5a93a1c9c43ae71.zip
Make invalid deps non-fatal for some phases.
svn path=/main/trunk/; revision=5655
-rw-r--r--pym/portage.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index d27cd70b4..c867769c5 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -3352,6 +3352,10 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
return spawn(EBUILD_SH_BINARY + " depend", mysettings)
+ # Validate dependency metadata here to ensure that ebuilds with invalid
+ # data are never installed (even via the ebuild command).
+ invalid_dep_exempt_phases = \
+ set(["clean", "cleanrm", "help", "prerm", "postrm"])
mycpv = mysettings["CATEGORY"] + "/" + mysettings["PF"]
dep_keys = ["DEPEND", "RDEPEND", "PDEPEND"]
metadata = dict(izip(dep_keys, mydbapi.aux_get(mycpv, dep_keys)))
@@ -3367,7 +3371,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
if not mycheck[0]:
writemsg("%s: %s\n%s\n" % (
dep_type, metadata[dep_type], mycheck[1]), noiselevel=-1)
- return 1
+ if mydo not in invalid_dep_exempt_phases:
+ return 1
del dep_type, mycheck
del mycpv, dep_keys, metadata, FakeTree, dep_check_trees