From: Sebastian Luther Date: Tue, 14 Sep 2010 18:34:10 +0000 (+0200) Subject: Add :.repo syntax support for portage.util.{grabfile_package,grabdict_package} X-Git-Tag: v2.2_rc83~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b666024c82ab73ab5c2cbdfb2c8b12ec008b2b81;p=portage.git Add :.repo syntax support for portage.util.{grabfile_package,grabdict_package} --- diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index 600068507..8bbc15b92 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -331,7 +331,7 @@ def read_corresponding_eapi_file(filename): return eapi -def grabdict_package(myfilename, juststrings=0, recursive=0, allow_wildcard=False, verify_eapi=False): +def grabdict_package(myfilename, juststrings=0, recursive=0, allow_wildcard=False, allow_repo=False, verify_eapi=False): """ Does the same thing as grabdict except it validates keys with isvalidatom()""" pkgs=grabdict(myfilename, juststrings, empty=1, recursive=recursive) @@ -345,7 +345,7 @@ def grabdict_package(myfilename, juststrings=0, recursive=0, allow_wildcard=Fals atoms = {} for k, v in pkgs.items(): try: - k = Atom(k, allow_wildcard=allow_wildcard, eapi=eapi) + k = Atom(k, allow_wildcard=allow_wildcard, allow_repo=allow_repo, eapi=eapi) except InvalidAtom as e: writemsg(_("--- Invalid atom in %s: %s\n") % (myfilename, e), noiselevel=-1) @@ -353,7 +353,7 @@ 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, \ +def grabfile_package(myfilename, compatlevel=0, recursive=0, allow_wildcard=False, allow_repo=False, \ remember_source_file=False, verify_eapi=False): pkgs=grabfile(myfilename, compatlevel, recursive=recursive, remember_source_file=True) @@ -370,7 +370,7 @@ def grabfile_package(myfilename, compatlevel=0, recursive=0, allow_wildcard=Fals if pkg[:1] == '*' and mybasename == 'packages': pkg = pkg[1:] try: - pkg = Atom(pkg, allow_wildcard=allow_wildcard, eapi=eapi) + pkg = Atom(pkg, allow_wildcard=allow_wildcard, allow_repo=allow_repo, eapi=eapi) except InvalidAtom as e: writemsg(_("--- Invalid atom in %s: %s\n") % (myfilename, e), noiselevel=-1)