diff --git a/lib/flaggie/action.py b/lib/flaggie/action.py index 9e98256..ee6fb08 100644 --- a/lib/flaggie/action.py +++ b/lib/flaggie/action.py @@ -52,7 +52,7 @@ class Action(object): # Check whether the argument looks like a pattern but denote that # for keywords '**' and '*' have special meaning. - if (ns and 'kw' not in ns) or arg not in ('**', '*'): + if (ns and 'kw' not in ns) or arg not in ('**', '*', '~*'): for schr in ('*', '?', '['): if schr in arg: if not ns: diff --git a/lib/flaggie/cache.py b/lib/flaggie/cache.py index 02c66cb..c9ecbca 100644 --- a/lib/flaggie/cache.py +++ b/lib/flaggie/cache.py @@ -95,7 +95,7 @@ class Caches(object): kws = set() for r in self.dbapi.porttrees: kws.update(grabfile(os.path.join(r, 'profiles', 'arch.list'))) - kws.update(['~%s' % x for x in kws], ('*', '**')) + kws.update(['~%s' % x for x in kws], ('*', '**', '~*')) # and the ** special keyword self.cache[None] = frozenset(kws) diff --git a/lib/flaggie/cleanup.py b/lib/flaggie/cleanup.py index 053fd4a..d068005 100644 --- a/lib/flaggie/cleanup.py +++ b/lib/flaggie/cleanup.py @@ -61,7 +61,7 @@ class DropUnmatchedFlags(BaseCleanupAction): if dbcache[pe.package]: flags = cache[pe.package] for flag in set([x.name for x in pe]): - if k == 'kw' and flag == '**': + if k == 'kw' and (flag == '**' or flag == '*' or flag == '~*'): pass elif flag not in flags: del pe[flag]