Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 104579 Details for
Bug 133045
i386 packages don't get upgraded on x86-64
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
Simple testcase not requiring install
test-findpackageset.py (text/plain), 2.14 KB, created by
Paul Nasrat
on 2004-09-30 11:45:43 UTC
(
hide
)
Description:
Simple testcase not requiring install
Filename:
MIME Type:
Creator:
Paul Nasrat
Created:
2004-09-30 11:45:43 UTC
Size:
2.14 KB
patch
obsolete
>#!/usr/bin/python > >import os >import sys >import rpm >import glob >import getopt > >sys.path.append("/usr/lib/anaconda") >import findpackageset > >ts=rpm.ts() > >def createHdListFromPkgDir(path): > filelist = glob.glob("%s/*rpm" % path) > hdlist = [] > global ts > for file in filelist: > try: > f = os.open(file, os.O_RDONLY) > except: > continue > h = ts.hdrFromFdno(f) > hdlist.append(h) > os.close(f) > return hdlist > >def createHdListFromFile(path): > hdlist = rpm.readHeaderListFromFile(path) > return hdlist > >def usage(): > print """%s: >[ --hdlist=<hdlist>| --rpmpath=<rpmpath> ] [ --dbpath=<dbpath>] >Defaults to looking for hdlist on /mnt/cdrom/Fedora/base and rpmdb on / >Usage: >--hdlist=<hdlist> Path to a hdlist file (/mnt/Fedora/base/hdlist) >--rpmpath=<rpmpath> Path to a rpms directory to create hdlist from >--dbpath=<dbpath> Path to chroot for rpmdb in /path/var/lib/rpm > """ % (sys.argv[0],) > >if __name__ == "__main__": > use_hdlist = 0 > hdlist_path = "/mnt/cdrom/Fedora/base" > use_rpm = 0 > rpm_path = "/mnt/cdrom/Fedora/RPMS" > dbPath = "/" > hdrlist = [] > > try: > opts, args = getopt.getopt(sys.argv[1:], 'h', ['help','hdlist=','rpmpath=','dbpath=']) > except getopt.error, e: > usage() > sys.exit(1) > > for o, a in opts: > if o in ["-h", "--help"]: > usage() > sys.exit(0) > elif o == "--hdlist": > use_hdlist = 1 > hdlist_path = a > elif o == "--rpmpath": > use_rpms = 1 > rpm_path = a > elif o == "--dbpath": > dbPath = os.path.realpath(a) > > if use_hdlist and use_rpms: > print "ERROR: Only one of hdlist and rpmpath to be used" > usage() > sys.exit(1) > > if not use_hdlist and not use_rpms: > use_hdlist = 1 > > if use_hdlist: > hdrlist = createHdListFromFile(hdlist_path) > elif use_rpm: > hdrlist = createHdListFromPkgDir(rpm_path) > > if hdrlist: > packageset = findpackageset.findpackageset(hdrlist, dbPath=dbPath) > for pkg in packageset: > print "%(name)s-%(version)s-%(release)s.%(arch)s" % pkg >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 133045
:
104108
|
104520
|
104555
| 104579