summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--comps.py12
-rw-r--r--eli.py3
-rw-r--r--lilo.py3
-rw-r--r--milo.py6
-rw-r--r--silo.py3
-rw-r--r--todo.py27
6 files changed, 30 insertions, 24 deletions
diff --git a/comps.py b/comps.py
index 92755d9e8..f9417b5aa 100644
--- a/comps.py
+++ b/comps.py
@@ -290,13 +290,13 @@ class ComponentSet:
def totalSize(self):
total = 0
for pkg in self.packages.list():
- total = total + (pkg['size'] / 1024)
+ total = total + (pkg[rpm.RPMTAG_SIZE] / 1024)
return total
def size(self):
size = 0
for pkg in self.packages.list():
- if pkg.isSelected(): size = size + (pkg['size'] / 1024)
+ if pkg.isSelected(): size = size + (pkg[rpm.RPMTAG_SIZE] / 1024)
return size / 1024
@@ -440,10 +440,10 @@ class ComponentSet:
everything = Component(_("Everything"), 0, 0)
for package in packages.keys ():
- if (packages[package]['name'] != 'kernel' and
- packages[package]['name'] != 'kernel-BOOT' and
- packages[package]['name'] != 'kernel-smp' and
- not XFreeServerPackages.has_key(packages[package]['name'])):
+ if (packages[package][rpm.RPMTAG_NAME] != 'kernel' and
+ packages[package][rpm.RPMTAG_NAME] != 'kernel-BOOT' and
+ packages[package][rpm.RPMTAG_NAME] != 'kernel-smp' and
+ not XFreeServerPackages.has_key(packages[package][rpm.RPMTAG_NAME])):
everything.addPackage (packages[package])
self.comps.append (everything)
self.compsDict["Everything"] = everything
diff --git a/eli.py b/eli.py
index e3c8bf003..b6813ff8b 100644
--- a/eli.py
+++ b/eli.py
@@ -81,7 +81,8 @@ class EliConfiguration:
kernelList.append((label, hdList['kernel'], ""))
for (label, kernel, tag) in kernelList:
- kernelTag = "-%s-%s%s" % (kernel['version'], kernel['release'], tag)
+ kernelTag = "-%s-%s%s" % (kernel[rpm.RPMTAG_VERSION],
+ kernel[rpm.RPMTAG_RELEASE], tag)
kernelFile = "vmlinux" + kernelTag
try:
diff --git a/lilo.py b/lilo.py
index 69e6b3240..451f45529 100644
--- a/lilo.py
+++ b/lilo.py
@@ -307,7 +307,8 @@ class LiloConfiguration:
kernelList.append((label, hdList['kernel'], ""))
for (label, kernel, tag) in kernelList:
- kernelTag = "-%s-%s%s" % (kernel['version'], kernel['release'], tag)
+ kernelTag = "-%s-%s%s" % (kernel[rpm.RPMTAG_VERSION],
+ kernel[rpm.RPMTAG_RELEASE], tag)
kernelFile = "/boot/vmlinuz" + kernelTag
try:
diff --git a/milo.py b/milo.py
index b19f8fc9b..ef4030cb5 100644
--- a/milo.py
+++ b/milo.py
@@ -93,7 +93,8 @@ class MiloInstall:
extra=""
if os.access (self.todo.instPath + initrd, os.R_OK):
extra=" initrd=%s/%s" % (kernelprefix, initrd)
- version = "%s-%s" % (kernel['version'], kernel['release'])
+ version = "%s-%s" % (kernel[rpm.RPMTAG_VERSION],
+ kernel[rpm.RPMTAG_RELEASE])
f.write ("%d:%d%svmlinuz-%s%s root=/dev/%s%s\n" %
(lines, partition, kernelprefix,
version, tag, rootDevice, extra))
@@ -145,7 +146,8 @@ class MiloInstall:
if (self.todo.hdList.has_key(package) and
self.todo.hdList[package].selected):
kernel = self.todo.hdList[package]
- version = "%s-%s" % (kernel['version'], kernel['release'])
+ version = "%s-%s" % (kernel[rpm.RPMTAG_VERSION],
+ kernel[rpm.RPMTAG_RELEASE])
# if this is UP and we have a kernel (the smp kernel),
# then call it linux-up
if not tag and kernels:
diff --git a/silo.py b/silo.py
index d94ebdbd1..0f850dfc1 100644
--- a/silo.py
+++ b/silo.py
@@ -305,7 +305,8 @@ class SiloInstall:
kernelList.append((label, hdList['kernel'], ""))
for (label, kernel, tag) in kernelList:
- kernelTag = "-%s-%s%s" % (kernel['version'], kernel['release'], tag)
+ kernelTag = "-%s-%s%s" % (kernel[rpm.RPMTAG_VERSION],
+ kernel[rpm.RPMTAG_RELEASE], tag)
initrd = self.makeInitrd (kernelTag, instRoot)
if rootDev == bootpart:
kernelFile = "/boot/vmlinuz" + kernelTag
diff --git a/todo.py b/todo.py
index f5af44227..7ca13335c 100644
--- a/todo.py
+++ b/todo.py
@@ -496,7 +496,8 @@ class ToDo:
os.close(fd)
kernel = self.hdList['kernel']
- kernelTag = "-%s-%s" % (kernel['version'], kernel['release'])
+ kernelTag = "-%s-%s" % (kernel[rpm.RPMTAG_VERSION],
+ kernel[rpm.RPMTAG_RELEASE])
w = self.intf.waitWindow (_("Creating"), _("Creating boot disk..."))
rc = iutil.execWithRedirect("/sbin/mkbootdisk",
@@ -1274,12 +1275,12 @@ class ToDo:
if (self.hdList.has_key('kernel-smp') and
self.hdList['kernel-smp'].selected):
- version = (self.hdList['kernel-smp']['version'] + "-" +
- self.hdList['kernel-smp']['release'] + "smp")
+ version = (self.hdList['kernel-smp'][rpm.RPMTAG_VERSION] + "-" +
+ self.hdList['kernel-smp'][rpm.RPMTAG_RELEASE] + "smp")
kernelVersions.append(version)
- version = (self.hdList['kernel']['version'] + "-" +
- self.hdList['kernel']['release'])
+ version = (self.hdList['kernel'][rpm.RPMTAG_VERSION] + "-" +
+ self.hdList['kernel'][rpm.RPMTAG_RELEASE])
kernelVersions.append(version)
for (path, subdir, name) in self.extraModules:
@@ -1311,12 +1312,12 @@ class ToDo:
if (self.hdList.has_key('kernel-smp') and
self.hdList['kernel-smp'].selected):
- version = (self.hdList['kernel-smp']['version'] + "-" +
- self.hdList['kernel-smp']['release'] + "smp")
+ version = (self.hdList['kernel-smp'][rpm.RPMTAG_VERSION] + "-" +
+ self.hdList['kernel-smp'][rpm.RPMTAG_RELEASE] + "smp")
kernelVersions.append(version)
- version = (self.hdList['kernel']['version'] + "-" +
- self.hdList['kernel']['release'])
+ version = (self.hdList['kernel'][rpm.RPMTAG_VERSION] + "-" +
+ self.hdList['kernel'][rpm.RPMTAG_RELEASE])
kernelVersions.append(version)
for version in kernelVersions:
@@ -1350,9 +1351,9 @@ class ToDo:
return -1
elif one > two:
return 1
- elif string.lower(first['name']) < string.lower(second['name']):
+ elif string.lower(first[rpm.RPMTAG_NAME]) < string.lower(second[rpm.RPMTAG_NAME]):
return -1
- elif string.lower(first['name']) > string.lower(second['name']):
+ elif string.lower(first[rpm.RPMTAG_NAME]) > string.lower(second[rpm.RPMTAG_NAME]):
return 1
return 0
@@ -1469,7 +1470,7 @@ class ToDo:
l = []
for p in self.hdList.selected():
- if p.h['name'] != 'locale-ja':
+ if p.h[rpm.RPMTAG_NAME] != 'locale-ja':
l.append(p)
l.sort(self.sortPackages)
@@ -1481,7 +1482,7 @@ class ToDo:
for p in l:
ts.add(p.h, p.h, how)
total = total + 1
- totalSize = totalSize + (p['size'] / 1024 )
+ totalSize = totalSize + (p[rpm.RPMTAG_SIZE] / 1024 )
ts.order()