newdict[k] = " ".join(v)
return newdict
-def grabdict_package(myfilename, juststrings=0, recursive=0):
+def grabdict_package(myfilename, juststrings=0, recursive=0, allow_wildcard=False):
""" Does the same thing as grabdict except it validates keys
with isvalidatom()"""
pkgs=grabdict(myfilename, juststrings, empty=1, recursive=recursive)
atoms = {}
for k, v in pkgs.items():
try:
- k = Atom(k, allow_wildcard=True)
+ k = Atom(k, allow_wildcard=allow_wildcard)
except InvalidAtom:
writemsg(_("--- Invalid atom in %s: %s\n") % (myfilename, k),
noiselevel=-1)
atoms[k] = v
return atoms
-def grabfile_package(myfilename, compatlevel=0, recursive=0):
+def grabfile_package(myfilename, compatlevel=0, recursive=0, allow_wildcard=False):
pkgs=grabfile(myfilename, compatlevel, recursive=recursive)
mybasename = os.path.basename(myfilename)
atoms = []
if pkg[:1] == '*' and mybasename == 'packages':
pkg = pkg[1:]
try:
- pkg = Atom(pkg)
+ pkg = Atom(pkg, allow_wildcard=allow_wildcard)
except InvalidAtom:
writemsg(_("--- Invalid atom in %s: %s\n") % (myfilename, pkg),
noiselevel=-1)