1 |
commit: 38c80ed1434f0b03b0d7c5fa2095f3310f913c36 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 10 16:41:04 2014 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Tue Feb 11 08:04:10 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=38c80ed1 |
7 |
|
8 |
revdep_rebuild/assign.py: Make assign_packages() ignore files found in /var/db/pkg/ |
9 |
|
10 |
--- |
11 |
pym/gentoolkit/revdep_rebuild/assign.py | 10 ++++++++-- |
12 |
1 file changed, 8 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py |
15 |
index 4842ea9..11f7178 100644 |
16 |
--- a/pym/gentoolkit/revdep_rebuild/assign.py |
17 |
+++ b/pym/gentoolkit/revdep_rebuild/assign.py |
18 |
@@ -26,8 +26,14 @@ def assign_packages(broken, logger, settings): |
19 |
''' |
20 |
assigned = set() |
21 |
for group in os.listdir(settings['PKG_DIR']): |
22 |
- for pkg in os.listdir(settings['PKG_DIR'] + group): |
23 |
- f = settings['PKG_DIR'] + group + '/' + pkg + '/CONTENTS' |
24 |
+ grppath = settings['PKG_DIR'] + group |
25 |
+ if not os.path.isdir(grppath): |
26 |
+ continue |
27 |
+ for pkg in os.listdir(grppath): |
28 |
+ pkgpath = settings['PKG_DIR'] + group + '/' + pkg |
29 |
+ if not os.path.isdir(pkgpath): |
30 |
+ continue |
31 |
+ f = pkgpath + '/CONTENTS' |
32 |
if os.path.exists(f): |
33 |
try: |
34 |
with open(f, 'r') as cnt: |