diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-04 07:05:11 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-04 07:05:11 +0000 |
commit | b5d2bc19effeb36929b41897b681249f93d39cdf (patch) | |
tree | 5557054e599280df9b6783ef910d73b6fd7f42c8 | |
parent | b9e508c0ebe71b004a86294e06b5e5fb71ece9f1 (diff) | |
download | portage-b5d2bc19effeb36929b41897b681249f93d39cdf.tar.gz portage-b5d2bc19effeb36929b41897b681249f93d39cdf.tar.bz2 portage-b5d2bc19effeb36929b41897b681249f93d39cdf.zip |
Make portdbapi.getfetchlist() bail out if the EAPI
is unsupported. This makes it impossible for an
unsupported EAPI to result in invalid Manifest
generation.
svn path=/main/trunk/; revision=7916
-rw-r--r-- | pym/portage/dbapi/porttree.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 83c568fa0..2c205ae9e 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -371,13 +371,20 @@ class portdbapi(dbapi): if mysettings is None: mysettings = self.mysettings try: - myuris = self.aux_get(mypkg, ["SRC_URI"], mytree=mytree)[0] + eapi, myuris = self.aux_get(mypkg, + ["EAPI", "SRC_URI"], mytree=mytree) except KeyError: # Convert this to an InvalidDependString exception since callers # already handle it. raise portage.exception.InvalidDependString( "getfetchlist(): aux_get() error reading "+mypkg+"; aborting.") + if not eapi_is_supported(eapi): + # Convert this to an InvalidDependString exception + # since callers already handle it. + raise portage.exception.InvalidDependString( + "getfetchlist(): Unsupported EAPI: '%s'" % eapi.lstrip("-")) + if useflags is None: useflags = mysettings["USE"].split() |