From: Brian Dolbec Date: Fri, 2 Mar 2012 17:46:28 +0000 (-0800) Subject: fix bug 406613. ignore any .keep_* files in /var/db/pkg. Print a warning for any... X-Git-Tag: gentoolkit-0.3.0.6~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2d303c857523978de043c0844f213567113feda5;p=gentoolkit.git fix bug 406613. ignore any .keep_* files in /var/db/pkg. Print a warning for any other files found. --- diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py index af82b27..73f20a9 100644 --- a/pym/gentoolkit/revdep_rebuild/assign.py +++ b/pym/gentoolkit/revdep_rebuild/assign.py @@ -21,6 +21,11 @@ def assign_packages(broken, logger, settings): ''' assigned = set() for group in os.listdir(settings['PKG_DIR']): + if os.path.isfile(settings['PKG_DIR'] + group): + if not group.startswith('.keep_'): + logger.warn(yellow(" * Invalid category found in the installed pkg db: ") + + bold(settings['PKG_DIR'] + group)) + continue for pkg in os.listdir(settings['PKG_DIR'] + group): _file = settings['PKG_DIR'] + group + '/' + pkg + '/CONTENTS' if os.path.exists(_file):