diff options
author | Paul Nasrat <pnasrat@redhat.com> | 2005-08-19 17:57:40 +0000 |
---|---|---|
committer | Paul Nasrat <pnasrat@redhat.com> | 2005-08-19 17:57:40 +0000 |
commit | 41b4abcd4ee127964ef113224e93cb482a9f3030 (patch) | |
tree | ad474727a2855914a896ed097652ac2ec2b267cf /hdrlist.py | |
parent | fb131d067ced087db2efd50d91675d9f168e0f9e (diff) | |
download | anaconda-41b4abcd4ee127964ef113224e93cb482a9f3030.tar.gz anaconda-41b4abcd4ee127964ef113224e93cb482a9f3030.tar.xz anaconda-41b4abcd4ee127964ef113224e93cb482a9f3030.zip |
remove unused function
Diffstat (limited to 'hdrlist.py')
-rw-r--r-- | hdrlist.py | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/hdrlist.py b/hdrlist.py index 3a8154dc1..a75307153 100644 --- a/hdrlist.py +++ b/hdrlist.py @@ -1015,91 +1015,3 @@ def orderPackageGroups(grpset): return (retlist, retdict) -if __name__ == "__main__": - tree = "/mnt/redhat/test/rawhide-20040109/i386/" - - def simpleInstallCallback(what, amount, total, h, (param)): - global rpmfd - if (what == rpm.RPMCALLBACK_TRANS_START): - # step 6 is the bulk of the transaction set - # processing time - if amount == 6: - print "Preparing to install..." - if (what == rpm.RPMCALLBACK_TRANS_PROGRESS): - pass - - if (what == rpm.RPMCALLBACK_TRANS_STOP): - pass - - if (what == rpm.RPMCALLBACK_INST_OPEN_FILE): - print "Installing %s" %(nevra(h),) - rpmfd = os.open("%s/%s/RPMS/%s-%s-%s.%s.rpm" - %(tree, productPath, h['name'], h['version'], h['release'], - h['arch']), os.O_RDONLY) - return rpmfd - elif (what == rpm.RPMCALLBACK_INST_PROGRESS): - pass - elif (what == rpm.RPMCALLBACK_INST_CLOSE_FILE): - os.close (rpmfd) - elif ((what == rpm.RPMCALLBACK_UNPACK_ERROR) or - (what == rpm.RPMCALLBACK_CPIO_ERROR)): - print "ERROR!" - sys.exit(0) - else: - pass - - def packageSort(first, second): - one = first[1000002] - two = second[1000002] - - if one < two: - return -1 - elif one > two: - return 1 - return 0 - - - fd = os.open("%s/%s/base/hdlist" % (tree, productPath), os.O_RDONLY) - hdrs = rpm.readHeaderListFromFD(fd) - os.close(fd) - showMem() - f = open("%s/%s/base/comps.xml" % (tree, productPath), "r") - comps = rhpl.comps.Comps(f) - f.close() - showMem() - hdrlist = HeaderList(hdrs) - hdrlist.mergeFullHeaders("%s/%s/base/hdlist2" % (tree, productPath)) - showMem() - groups = GroupSet(comps, hdrlist) - showMem() - - for h in hdrlist.hdlist: - print h[rpm.RPMTAG_NAME], h[rpm.RPMTAG_FILENAMES] - sys.exit(0) - - ts = rpm.TransactionSet("/tmp/testinstall") - ts.setVSFlags(-1) - ts.setFlags(rpm.RPMTRANS_FLAG_ANACONDA) - showMem() - - l = [] - groups.groups["base"].select() - groups.hdrlist["evolution"].select() - - for hdr in groups.hdrlist.pkgs.values(): - if hdr.isSelected(): - l.append(hdr) - print "going to install %s" %(nevra(hdr),) - - depcheck = DependencyChecker(groups) - - l.sort(packageSort) - for h in l: - ts.addInstall(h.hdr, h.hdr, "i") - foo = ts.check(depcheck.callback) - - print depcheck.added - sys.exit(0) - ts.run(simpleInstallCallback, 0) - - |