summaryrefslogtreecommitdiffstats
path: root/rpmmodule
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-16 23:25:10 +0000
committerMatt Wilson <msw@redhat.com>1999-08-16 23:25:10 +0000
commit7277aabe318f322140195f214c3c4a5b9ef441d0 (patch)
treed93a001329ade3f1a911ae25ad715e230c9d7369 /rpmmodule
parente9db63dfa0ae90131bee831cd0da4f77ed5c3ea3 (diff)
downloadanaconda-7277aabe318f322140195f214c3c4a5b9ef441d0.tar.gz
anaconda-7277aabe318f322140195f214c3c4a5b9ef441d0.tar.xz
anaconda-7277aabe318f322140195f214c3c4a5b9ef441d0.zip
package deps
Diffstat (limited to 'rpmmodule')
-rwxr-xr-xrpmmodule/testit22
1 files changed, 13 insertions, 9 deletions
diff --git a/rpmmodule/testit b/rpmmodule/testit
index d2f2d4b3f..5311fd62f 100755
--- a/rpmmodule/testit
+++ b/rpmmodule/testit
@@ -2,28 +2,32 @@
import rpm
import os
+import time
def cb(what, amount, total, key, data):
if (what == rpm.RPMCALLBACK_INST_OPEN_FILE):
d = os.open(key, os.O_RDONLY)
return d
-fd = os.open('foo', os.O_RDONLY);
-(h, isSource) = rpm.headerFromPackage(fd)
-print "from foo:", h[rpm.RPMTAG_NAME]
-os.close(fd)
+## fd = os.open('foo', os.O_RDONLY);
+## (h, isSource) = rpm.headerFromPackage(fd)
+## print "from foo:", h[rpm.RPMTAG_NAME]
+## os.close(fd)
-#list = rpm.readHeaderList('hdlist')
-#print "got", len(list), "items"
+list = rpm.readHeaderList('/mnt/test/msw/i386/RedHat/base/hdlist')
+print "got", len(list), "items"
d = rpm.opendb(0)
-ts = rpm.TransactionSet("/", d)
+ts = rpm.TransactionSet()
-ts.add(h, "foo")
+for h in list:
+ ts.add(h, "foo", "a")
+
+ts.add(list[0], "foo")
rc = ts.depcheck()
print rc
ts.order()
-print "run", ts.run(rpm.RPMTRANS_FLAG_TEST, 0, cb, "arg")
+#print "run", ts.run(rpm.RPMTRANS_FLAG_TEST, 0, cb, "arg")