summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-12 14:37:45 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-12 14:37:45 +0000
commitb5a93ce96f37c9dd69845c02057aef154ef6f0cc (patch)
tree7cc4a37b85ab0b962d145f59e03a9e08d01bb464
parent0ad1d4b5b0618994e29e9b9e43d296a3a802eee7 (diff)
downloadportage-b5a93ce96f37c9dd69845c02057aef154ef6f0cc.tar.gz
portage-b5a93ce96f37c9dd69845c02057aef154ef6f0cc.tar.bz2
portage-b5a93ce96f37c9dd69845c02057aef154ef6f0cc.zip
Make grabfile_package() accept *atom only for files named 'packages' since
they are not valid in any other files. svn path=/main/trunk/; revision=14225
-rw-r--r--pym/portage/util.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/util.py b/pym/portage/util.py
index f6f21f586..3232a4e51 100644
--- a/pym/portage/util.py
+++ b/pym/portage/util.py
@@ -306,13 +306,14 @@ def grabdict_package(myfilename, juststrings=0, recursive=0):
def grabfile_package(myfilename, compatlevel=0, recursive=0):
pkgs=grabfile(myfilename, compatlevel, recursive=recursive)
+ mybasename = os.path.basename(myfilename)
atoms = []
for pkg in pkgs:
pkg_orig = pkg
# for packages and package.mask files
if pkg[:1] == "-":
pkg = pkg[1:]
- if pkg[:1] == "*":
+ if pkg[:1] == '*' and mybasename == 'packages':
pkg = pkg[1:]
try:
pkg = Atom(pkg)