summaryrefslogtreecommitdiffstats
path: root/comps.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-06-28 05:26:36 +0000
committerMike Fulbright <msf@redhat.com>2002-06-28 05:26:36 +0000
commitb2547fefc48499c5f182227b0faf887df7a49fbd (patch)
tree5397d752e78c246627b67b1e243731f9885ceebf /comps.py
parent9f6e78c4417d960a1df8eb580ca6a2af17072d49 (diff)
downloadanaconda-b2547fefc48499c5f182227b0faf887df7a49fbd.tar.gz
anaconda-b2547fefc48499c5f182227b0faf887df7a49fbd.tar.xz
anaconda-b2547fefc48499c5f182227b0faf887df7a49fbd.zip
quick hack to order new comps
Diffstat (limited to 'comps.py')
-rw-r--r--comps.py70
1 files changed, 70 insertions, 0 deletions
diff --git a/comps.py b/comps.py
index 278d47c99..c0d73c94a 100644
--- a/comps.py
+++ b/comps.py
@@ -807,3 +807,73 @@ class ComponentSet:
self.packages = hdlist
self.readCompsFile(file, self.packages)
+
+
+# this is a temporary way to set order of packages
+def orderPackageGroups(curgroups):
+ compsOrder = [
+ "Base X Support",
+ "Printing Support",
+ "GNOME Desktop Environment",
+ "KDE Desktop Environment",
+ "Authoring and Publishing",
+ "Games and Entertainment",
+ "GNOME Games and Entertainment",
+ "KDE Games and Entertainment",
+ "X Based Games and Entertainment",
+ "Messaging and Web Tools",
+ "GNOME Messaging and Web Tools",
+ "KDE Messaging and Web Tools",
+ "Multimedia Software",
+ "GNOME Multimedia Software",
+ "KDE Multimedia Software",
+ "Office/Productivity Software",
+ "GNOME Office/Productivity Software",
+ "KDE Office/Productivity Software",
+ "Emacs",
+ "Kernel Development",
+ "Software Development",
+ "GNOME Software Development",
+ "KDE Software Development",
+ "X Software Development",
+ "Multimedia Software Development",
+ "Utilities",
+ "Workstation Tools",
+ "Dialup Networking Support",
+ "NFS File Server",
+ "Web Server",
+ "FTP Server",
+ "Windows File Server",
+ "DNS Name Server",
+ "SQL Database Server",
+ "Network Servers",
+ "News Server",
+ ]
+
+ ignorelst = []
+ retval = []
+ while 1:
+ bestfit = len(compsOrder)+1
+ bestgrp = None
+ for grp in curgroups:
+ if grp.name in ignorelst:
+ continue
+ if grp.name in compsOrder:
+ if compsOrder.index(grp.name) < bestfit:
+ bestfit = compsOrder.index(grp.name)
+ bestgrp = grp
+
+ if bestgrp is None:
+ for grp in curgroups:
+ if grp.name not in ignorelst:
+ bestgrp = grp
+ break
+
+ if bestgrp is None:
+ break
+
+ ignorelst.append(bestgrp.name)
+ retval.append(bestgrp)
+
+ return retval
+