From 2d303c857523978de043c0844f213567113feda5 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Fri, 2 Mar 2012 09:46:28 -0800 Subject: [PATCH] fix bug 406613. ignore any .keep_* files in /var/db/pkg. Print a warning for any other files found. --- pym/gentoolkit/revdep_rebuild/assign.py | 5 +++++ 1 file changed, 5 insertions(+) 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): -- 2.26.2