fix bug 406613. ignore any .keep_* files in /var/db/pkg. Print a warning for any...
authorBrian Dolbec <dolsen@gentoo.org>
Fri, 2 Mar 2012 17:46:28 +0000 (09:46 -0800)
committerBrian Dolbec <dolsen@gentoo.org>
Fri, 2 Mar 2012 17:46:28 +0000 (09:46 -0800)
pym/gentoolkit/revdep_rebuild/assign.py

index af82b271fc4930b55b93f046d65afb9cc8938955..73f20a9f001bf55cb7c9e6ada25ceaf1666bf783 100644 (file)
@@ -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):