[yum-cvs] yum callback.py,1.25,1.26
Seth Vidal
skvidal at linux.duke.edu
Tue Apr 11 21:37:25 UTC 2006
Update of /home/groups/yum/cvs/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv21299
Modified Files:
callback.py
Log Message:
merge in jbowes patches for his previous patches - 4/4
had to modify the patch due to first hunk not actually having a change in
it.
Index: callback.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/callback.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- callback.py 4 Oct 2005 19:00:24 -0000 1.25
+++ callback.py 11 Apr 2006 21:37:23 -0000 1.26
@@ -127,17 +127,19 @@
# log stuff
pkgtup = self._dopkgtup(hdr)
- txmbr = self.tsInfo.getMembers(pkgtup=pkgtup)[0] # if we have more than one I'll eat my hat
- try:
- process = self.myprocess[txmbr.output_state]
- processed = self.mypostprocess[txmbr.output_state]
- except KeyError, e:
- pass
-
- if self.filelog:
- pkgrep = self._logPkgString(hdr)
- msg = '%s: %s' % (processed, pkgrep)
- self.filelog(0, msg)
+
+ txmbrs = self.tsInfo.getMembers(pkgtup=pkgtup)
+ for txmbr in txmbrs:
+ try:
+ process = self.myprocess[txmbr.output_state]
+ processed = self.mypostprocess[txmbr.output_state]
+ except KeyError, e:
+ pass
+
+ if self.filelog:
+ pkgrep = self._logPkgString(hdr)
+ msg = '%s: %s' % (processed, pkgrep)
+ self.filelog(0, msg)
elif what == rpm.RPMCALLBACK_INST_PROGRESS:
@@ -164,20 +166,22 @@
else:
percent = (bytes*100L)/total
pkgtup = self._dopkgtup(hdr)
- txmbr = self.tsInfo.getMembers(pkgtup=pkgtup)[0]
- try:
- process = self.myprocess[txmbr.output_state]
- except KeyError, e:
- print "Error: invalid output state: %s for %s" % \
- (txmbr.output_state, hdr['name'])
- else:
- if self.output and sys.stdout.isatty():
- fmt = self._makefmt(percent)
- msg = fmt % (process, hdr['name'])
- sys.stdout.write(msg)
- sys.stdout.flush()
- if bytes == total:
- print " "
+
+ txmbrs = self.tsInfo.getMembers(pkgtup=pkgtup)
+ for txmbr in txmbrs:
+ try:
+ process = self.myprocess[txmbr.output_state]
+ except KeyError, e:
+ print "Error: invalid output state: %s for %s" % \
+ (txmbr.output_state, hdr['name'])
+ else:
+ if self.output and sys.stdout.isatty():
+ fmt = self._makefmt(percent)
+ msg = fmt % (process, hdr['name'])
+ sys.stdout.write(msg)
+ sys.stdout.flush()
+ if bytes == total:
+ print " "
elif what == rpm.RPMCALLBACK_UNINST_START:
More information about the Yum-cvs-commits
mailing list