summaryrefslogtreecommitdiff
path: root/packaging/print-groups.py
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/print-groups.py')
-rw-r--r--packaging/print-groups.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/packaging/print-groups.py b/packaging/print-groups.py
new file mode 100644
index 0000000..d73e31a
--- /dev/null
+++ b/packaging/print-groups.py
@@ -0,0 +1,26 @@
+
+import Config
+execfile("rpmgroups.config")
+
+
+VALID_GROUPS = Config.getOption('ValidGroups', None)
+VALID_DOMAINS = Config.getOption('ValidDomains', None)
+VALID_SUBDOMAINS = Config.getOption('ValidSubDomains', None)
+VALID_NONE_DOMAINS = Config.getOption('ValidNoneDomains', None)
+
+if VALID_GROUPS is None: # get defaults from rpm package only if it's not set
+ VALID_GROUPS = Pkg.get_default_valid_rpmgroups()
+valid_groups = VALID_GROUPS
+app_groups = ()
+for d in VALID_DOMAINS:
+ if d == 'Applications':
+ for dd in ['Multimedia', 'Social', 'Web', 'Telephony', 'Messaging', 'PIM', 'Network', 'Navigation', 'Other', 'Game', 'Tasks', 'Music', 'Photo', 'Video']:
+ app_groups = app_groups + ("%s/%s" %(d,dd), )
+ continue
+ for sd in VALID_SUBDOMAINS:
+ valid_groups = valid_groups + ("%s/%s" %(d,sd), )
+
+valid_groups = valid_groups + app_groups
+valid_groups = valid_groups + VALID_NONE_DOMAINS
+for g in sorted(valid_groups):
+ print g