[yum-cvs] yum callback.py,1.23,1.24 cli.py,1.189,1.190
Paul Nasrat
pnasrat at login.linux.duke.edu
Tue Oct 4 18:43:46 UTC 2005
Update of /home/groups/yum/cvs/yum
In directory login:/tmp/cvs-serv30884
Modified Files:
callback.py cli.py
Log Message:
Move to use constants for transaction states
Index: callback.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/callback.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- callback.py 5 Aug 2005 06:32:16 -0000 1.23
+++ callback.py 4 Oct 2005 18:43:44 -0000 1.24
@@ -33,12 +33,18 @@
self.marks = 27
self.filelog = None
- self.myprocess = { 'updating': 'Updating', 'erasing': 'Erasing',
- 'installing': 'Installing', 'obsoleted': 'Obsoleted',
- 'obsoleting': 'Installing'}
- self.mypostprocess = { 'updating': 'Updated', 'erasing': 'Erased',
- 'installing': 'Installed', 'obsoleted': 'Obsoleted',
- 'obsoleting': 'Installed'}
+ self.myprocess = { TS_UPDATE : 'Updating',
+ TS_ERASE: 'Erasing',
+ TS_INSTALL: 'Installing',
+ TS_TRUEINSTALL : 'Installing',
+ TS_OBSOLETED: 'Obsoleted',
+ TS_OBSOLETING: 'Installing'}
+ self.mypostprocess = { TS_UPDATE: 'Updated',
+ TS_ERASE: 'Erased',
+ TS_INSTALL: 'Installed',
+ TS_TRUEINSTALL: 'Installed',
+ TS_OBSOLETED: 'Obsoleted',
+ TS_OBSOLETING: 'Installed'}
self.tsInfo = None # this needs to be set for anything else to work
Index: cli.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/cli.py,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- cli.py 14 Jul 2005 08:32:51 -0000 1.189
+++ cli.py 4 Oct 2005 18:43:44 -0000 1.190
@@ -29,6 +29,7 @@
import output
import shell
import yum
+from yum.constants import *
import yum.Errors
import yum.misc
import rpmUtils.arch
@@ -965,7 +966,7 @@
for (new, old) in updates:
txmbrs = self.tsInfo.getMembers(pkgtup=old)
- if txmbrs and txmbrs[0].output_state == 'obsoleted':
+ if txmbrs and txmbrs[0].output_state == TS_OBSOLETED:
self.log(5, 'Not Updating Package that is already obsoleted: %s.%s %s:%s-%s' % old)
else:
updating_pkg = self.getPackageObject(new)
More information about the Yum-cvs-commits
mailing list