summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-12-14 17:40:42 +0000
committerMatt Wilson <msw@redhat.com>2000-12-14 17:40:42 +0000
commit5f04bcdae8197942f9acd60a1b6a41ab6ece47b9 (patch)
tree1a9320762eed0a08a4396ef08ade78c26953ac4c /scripts
parent5c7ffd3916a7c110e7cf851f2b879f2161120d1b (diff)
downloadanaconda-5f04bcdae8197942f9acd60a1b6a41ab6ece47b9.tar.gz
anaconda-5f04bcdae8197942f9acd60a1b6a41ab6ece47b9.tar.xz
anaconda-5f04bcdae8197942f9acd60a1b6a41ab6ece47b9.zip
use new getData for speed
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/pkgorder29
1 files changed, 6 insertions, 23 deletions
diff --git a/scripts/pkgorder b/scripts/pkgorder
index 7bde60fd3..05d7f9975 100755
--- a/scripts/pkgorder
+++ b/scripts/pkgorder
@@ -7,7 +7,6 @@ import rpm
import string
rpmFD = None
-fns = {}
import comps
@@ -22,26 +21,6 @@ def cmpHeaderByName(h1, h2):
return 1
-def transCB(what, amount, total, h, intf):
- if (what == rpm.RPMCALLBACK_INST_OPEN_FILE):
- global rpmFD
- global distDir
- global pkgOrder
- global fns
- name = h[1000000]
-
- # we need the real header for later
- rpmFD = os.open(distDir + '/RedHat/RPMS/' + name, os.O_RDONLY)
- fd = os.open(distDir + '/RedHat/RPMS/' + name, os.O_RDONLY)
- (newH, isSource) = rpm.headerFromPackage(fd)
- os.close(fd)
- pkgOrder.append(newH)
- fns[newH] = name
- return rpmFD
- elif (what == rpm.RPMCALLBACK_INST_CLOSE_FILE):
- global rpmFD
- os.close (rpmFD)
-
if len(sys.argv) != 3:
print "splitdistro <toppath> <arch>"
sys.exit(1)
@@ -101,7 +80,11 @@ pkgOrder = []
ts.order()
-problems = ts.run(rpm.RPMTRANS_FLAG_TEST, ~0, transCB, None)
+try:
+ pkgOrder = ts.getKeys()
+except AttributError:
+ print "you don't have the latest RPM!"
for p in pkgOrder:
- print fns[p]
+ print p[1000000]
+