[yum-cvs] yum/yum __init__.py,1.86,1.87

Seth Vidal skvidal at login.linux.duke.edu
Wed Mar 2 06:20:02 UTC 2005


Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv17888/yum

Modified Files:
	__init__.py 
Log Message:

make yum install "foo > 1.1" work, along with all other virtual provides.
fixed a couple of bugs in the returnPackageByDep
cleaned up some useless string output


Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- __init__.py	26 Feb 2005 23:49:57 -0000	1.86
+++ __init__.py	2 Mar 2005 06:19:59 -0000	1.87
@@ -342,7 +342,7 @@
         """runs through the whole packageSack and excludes any arch not compatible
            with the system"""
         
-        self.log(2, 'Excluding Incompatible Archs')
+        self.log(3, 'Excluding Incompatible Archs')
         if not archlist:
             #archlist = ['src'] # source rpms are allowed
             archlist.extend(rpmUtils.arch.getArchList())
@@ -351,7 +351,7 @@
             if po.arch not in archlist:
                 self.log(3, 'Arch Excluding %s' % po)
                 self.pkgSack.delPackage(po)
-        self.log(2, 'Finished')
+        self.log(3, 'Finished')
         
         
         
@@ -1098,7 +1098,7 @@
         """Pass in a generic [build]require string and this function will 
            pass back the best(or first) package it finds providing that dep."""
         
-        flags = {'>':'GT', '<':'LT', '=': 'EQ', '>=':'GE', '<=':'LE'}
+        flags = {'>':'GT', '<':'LT', '=': 'EQ', '==': 'EQ', '>=':'GE', '<=':'LE'}
         self.doRepoSetup()
         # parse the string out
         #  either it is 'dep (some operator) e:v-r'
@@ -1112,6 +1112,8 @@
             # not a file dep - look at it for being versioned
             if re.search('[>=<]', depstring):  # versioned
                 depname, flagsymbol, depver = depstring.split()
+                if not flags.has_key(flagsymbol):
+                    raise Errors.YumBaseError, 'No Packages found for %s' % depstring
                 depflags = flags[flagsymbol]
                 
         sack = self.whatProvides(depname, depflags, depver)




More information about the Yum-cvs-commits mailing list