aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-02-22 18:08:11 +0100
committerMichał Górny <mgorny@gentoo.org>2017-02-22 18:08:11 +0100
commit0b07d8e0ad219985d17dafd3a71cb7eb44bd0e20 (patch)
treef3d2f4486782008731f381533fa5d3e8fdd127ab
parentpackages-inheriting-eclasses: Remove stale output files (diff)
downloadqa-scripts-0b07d8e0ad219985d17dafd3a71cb7eb44bd0e20.tar.gz
qa-scripts-0b07d8e0ad219985d17dafd3a71cb7eb44bd0e20.tar.bz2
qa-scripts-0b07d8e0ad219985d17dafd3a71cb7eb44bd0e20.zip
packages-inheriting-eclasses: Include unused eclasses
-rwxr-xr-xpackages-inheriting-eclasses.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages-inheriting-eclasses.py b/packages-inheriting-eclasses.py
index 082af8d..35ec59e 100755
--- a/packages-inheriting-eclasses.py
+++ b/packages-inheriting-eclasses.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import collections, datetime, os, os.path, sys
+import datetime, os, os.path, sys
import pkgcore.config # tested with pkgcore-0.9.2
def main(argv):
@@ -13,7 +13,11 @@ def main(argv):
c = pkgcore.config.load_config()
portdir = c.repo['gentoo']
- output = collections.defaultdict(set)
+ output = {}
+ # initiate with all eclasses
+ # (this also ensures we know eclasses that have no packages)
+ for k in portdir.eclass_cache.eclasses:
+ output[k] = set()
for p in portdir:
for eclass in p.data.get('_eclasses_', ()):