summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-06-05 23:46:52 +0000
committerErik Troan <ewt@redhat.com>2000-06-05 23:46:52 +0000
commit944051bbb9e776ccb27644599744f513c2f6ec86 (patch)
tree4a8731f9c7e915b27f1653b2b72edfc636711bab /todo.py
parent4051cb4941b5d648892b6515b3880b8d8660529b (diff)
downloadanaconda-944051bbb9e776ccb27644599744f513c2f6ec86.tar.gz
anaconda-944051bbb9e776ccb27644599744f513c2f6ec86.tar.xz
anaconda-944051bbb9e776ccb27644599744f513c2f6ec86.zip
setup package order properly for multi-cd installs
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py39
1 files changed, 35 insertions, 4 deletions
diff --git a/todo.py b/todo.py
index ea36b15e1..06b3e8c98 100644
--- a/todo.py
+++ b/todo.py
@@ -1171,6 +1171,27 @@ class ToDo:
self.createAccounts ()
self.writeTimezone()
+ def sortPackages(self, first, second):
+ one = 0
+ two = 0
+
+ if first[1000002] != None:
+ one = first[1000002]
+
+ if second[1000002] != None:
+ two = second[1000002]
+
+ if one < two:
+ return -1
+ elif one > two:
+ return 1
+ elif first['name'] < second['name']:
+ return -1
+ elif first['name'] > second['name']:
+ return 1
+
+ return 0
+
def doInstall(self):
# make sure we have the header list and comps file
self.getHeaderList()
@@ -1262,14 +1283,24 @@ class ToDo:
else:
how = "i"
+ l = []
+
+ for p in self.hdList.selected():
+ l.append(p)
+ l.sort(self.sortPackages)
+
# XXX HACK HACK for Japanese.
# Remove me when the japanese locales are in glibc package
- ts.add(self.hdList['locale-ja'].h, self.hdList['locale-ja'].h, how)
- for p in self.hdList.selected():
- if p.name != 'locale-ja':
+ localePackage = self.hdList['locale-ja'].h
+ l = [ localePackage ] + l
+ total = total + 1
+ totalSize = totalSize + localePackage[rpm.RPMTAG_SIZE]
+
+ for p in l:
+ if p['name'] != 'locale-ja':
ts.add(p.h, p.h, how)
total = total + 1
- totalSize = totalSize + p.h[rpm.RPMTAG_SIZE]
+ totalSize = totalSize + p['size']
ts.order()