summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2010-11-06 22:40:09 +0100
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2010-11-06 22:40:09 +0100
commit806ea1ce2dbe9ed1150048ae0c04fccd4af9046e (patch)
tree110c2f741d98fb6281e321c6e7289fd1cc22517a
parent3ce702920422afa1d113843176ee3d6f4a6cf771 (diff)
downloadportage-806ea1ce2dbe9ed1150048ae0c04fccd4af9046e.tar.gz
portage-806ea1ce2dbe9ed1150048ae0c04fccd4af9046e.tar.bz2
portage-806ea1ce2dbe9ed1150048ae0c04fccd4af9046e.zip
Accept eapi argument in portage.util.grabdict_package() and
portage.util.grabfile_package().
-rw-r--r--pym/portage/util/__init__.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py
index dacbcebc6..b32ebb86e 100644
--- a/pym/portage/util/__init__.py
+++ b/pym/portage/util/__init__.py
@@ -376,12 +376,12 @@ def read_corresponding_eapi_file(filename):
return eapi
-def grabdict_package(myfilename, juststrings=0, recursive=0, allow_wildcard=False, allow_repo=False, verify_eapi=False):
+def grabdict_package(myfilename, juststrings=0, recursive=0, allow_wildcard=False, allow_repo=False,
+ verify_eapi=False, eapi=None):
""" Does the same thing as grabdict except it validates keys
with isvalidatom()"""
pkgs=grabdict(myfilename, juststrings, empty=1, recursive=recursive)
- eapi = None
- if verify_eapi:
+ if verify_eapi and eapi is None:
eapi = read_corresponding_eapi_file(myfilename)
# We need to call keys() here in order to avoid the possibility of
@@ -398,12 +398,11 @@ def grabdict_package(myfilename, juststrings=0, recursive=0, allow_wildcard=Fals
atoms[k] = v
return atoms
-def grabfile_package(myfilename, compatlevel=0, recursive=0, allow_wildcard=False, allow_repo=False, \
- remember_source_file=False, verify_eapi=False):
+def grabfile_package(myfilename, compatlevel=0, recursive=0, allow_wildcard=False, allow_repo=False,
+ remember_source_file=False, verify_eapi=False, eapi=None):
pkgs=grabfile(myfilename, compatlevel, recursive=recursive, remember_source_file=True)
- eapi = None
- if verify_eapi:
+ if verify_eapi and eapi is None:
eapi = read_corresponding_eapi_file(myfilename)
mybasename = os.path.basename(myfilename)
atoms = []