diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-05 03:17:02 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-05 03:17:02 +0000 |
commit | 4ea96d5f484abfc26ff3e254cb9ba7f2ae572a18 (patch) | |
tree | 0048c173de9fe66fa1709256f4ed7905b9581f0c /pym | |
parent | 53537d28745eae6346c9da1e5d032357dd726725 (diff) | |
download | portage-4ea96d5f484abfc26ff3e254cb9ba7f2ae572a18.tar.gz portage-4ea96d5f484abfc26ff3e254cb9ba7f2ae572a18.tar.bz2 portage-4ea96d5f484abfc26ff3e254cb9ba7f2ae572a18.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. (trunk r7916)
svn path=/main/branches/2.1.2/; revision=7938
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py index 693333b7b..d17facf8f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6343,13 +6343,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() |