[yum-cvs] yum-utils repomanage.py,1.4,1.5
Seth Vidal
skvidal at login.linux.duke.edu
Sat Nov 26 15:27:33 UTC 2005
Update of /home/groups/yum/cvs/yum-utils
In directory login:/tmp/cvs-serv5100
Modified Files:
repomanage.py
Log Message:
check in most of patch from Ville Skytta from buy #524, disables payload
checking
Index: repomanage.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/repomanage.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- repomanage.py 19 Oct 2005 05:46:41 -0000 1.4
+++ repomanage.py 26 Nov 2005 15:27:31 -0000 1.5
@@ -68,14 +68,12 @@
fdno = os.open(package, os.O_RDONLY)
except OSError, e:
raise Error, "Error opening file %s" % package
- ts.setVSFlags(~(rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
try:
hdr = ts.hdrFromFdno(fdno)
except rpm.error, e:
raise Error, "Error opening package %s" % package
if type(hdr) != rpm.hdr:
raise Error, "Error opening package %s" % package
- ts.setVSFlags(0)
os.close(fdno)
return hdr
@@ -143,9 +141,10 @@
options['space'] = 0
options['keep'] = 1 # number of newest items to keep
# (defaults to single newest but it could be newest N)
+ options['nocheck'] = 0
try:
- gopts, argsleft = getopt.getopt(args, 'onhsk:', ['keep=','space',
- 'new', 'old', 'help'])
+ gopts, argsleft = getopt.getopt(args, 'onhskc:', ['keep=','space',
+ 'nocheck', 'new', 'old', 'help'])
except getopt.error, e:
errorprint('Options Error: %s.' % e)
usage()
@@ -176,6 +175,8 @@
options['space'] = 1
elif arg in ['-k', '--keep']:
options['keep'] = int(a)
+ elif arg in ['-c', '--nocheck']:
+ options['nocheck'] = 1
except ValueError, e:
@@ -223,6 +224,10 @@
ts = rpm.TransactionSet()
+ if options['nocheck']:
+ ts.setVSFlags(~(rpm._RPMVSF_NOPAYLOAD))
+ else:
+ ts.setVSFlags(~(rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
for pkg in rpmList:
try:
hdr = returnHdr(ts, pkg)
@@ -294,6 +299,7 @@
-n --new - print the newest packages
-s --space - space separated output, not newline
-k --keep - newest N packages to keep - defaults to 1
+ -c --nocheck - do not check package payload signatures/digests
-h --help - duh
By default it will output the full path to the newest packages in the path.
"""
More information about the Yum-cvs-commits
mailing list