[yum-cvs] yum/rpmUtils miscutils.py,1.19,1.20

Seth Vidal skvidal at linux.duke.edu
Wed Mar 21 06:53:15 UTC 2007


Update of /home/groups/yum/cvs/yum/rpmUtils
In directory login1.linux.duke.edu:/tmp/cvs-serv16695/rpmUtils

Modified Files:
	miscutils.py 
Log Message:

somehow we trickled in a '0' in the single case where we really do mean
('None') for epoch - the case is when the 'version' string from an rpm
header is '' then we should be returning (None, None, None) for the evr
tuple not ('0', None, None)

We tripped this, I think b/c maybe rpm changed from returning None for empty
version fields to returning ''. Unsure but this appears to do what is
expected either way.


Index: miscutils.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/rpmUtils/miscutils.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- miscutils.py	18 Feb 2007 14:30:57 -0000	1.19
+++ miscutils.py	21 Mar 2007 06:53:13 -0000	1.20
@@ -310,8 +310,8 @@
     return flags
 
 def stringToVersion(verstring):
-    if verstring is None:
-        return ('0', None, None)
+    if verstring in [None, '']:
+        return (None, None, None)
     i = verstring.find(':')
     if i != -1:
         try:




More information about the Yum-cvs-commits mailing list