[yum-cvs] yum cli.py,1.208,1.209
Jeremy Katz
katzj at linux.duke.edu
Thu Apr 20 19:26:34 UTC 2006
Update of /home/groups/yum/cvs/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv31806
Modified Files:
cli.py
Log Message:
handle --exclude used with a localinstall or localupdate (rh#178741)
Index: cli.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/cli.py,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -r1.208 -r1.209
--- cli.py 22 Feb 2006 21:25:23 -0000 1.208
+++ cli.py 20 Apr 2006 19:26:32 -0000 1.209
@@ -1134,22 +1134,36 @@
donothingpkgs.append(po)
continue
+ # handle excludes for a localinstall
+ toexc = []
+ if len(self.conf.exclude) > 0:
+ exactmatch, matched, unmatched = \
+ parsePackages(installpkgs + map(lambda x: x[0], updatepkgs),
+ self.conf.exclude, casematch=1)
+ toexc = exactmatch + matched
for po in installpkgs:
+ if po in toexc:
+ self.log(3, 'Excluding %s' % po)
+ continue
+
self.log(2, 'Marking %s to be installed' % po.localpath)
self.localPackages.append(po)
self.install(po=po)
for (po, oldpo) in updatepkgs:
+ if po in toexc:
+ self.log(3, 'Excluding %s' % po)
+ continue
+
self.log(2, 'Marking %s as an update to %s' % (po.localpath, oldpo))
self.localPackages.append(po)
self.tsInfo.addUpdate(po, oldpo)
for po in donothingpkgs:
self.log(2, '%s: does not update installed package.' % po.localpath)
-
+
if len(self.tsInfo) > oldcount:
-
return 2, ['Package(s) to install']
return 0, ['Nothing to do']
More information about the Yum-cvs-commits
mailing list