[yum-cvs] yum/rpmUtils updates.py,1.21,1.22
Seth Vidal
skvidal at login.linux.duke.edu
Sun Nov 20 09:15:58 UTC 2005
Update of /home/groups/yum/cvs/yum/rpmUtils
In directory login:/tmp/cvs-serv2688/rpmUtils
Modified Files:
updates.py
Log Message:
more or less get yum.YumBase.update() working
add updating_dict to updates
Index: updates.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/rpmUtils/updates.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- updates.py 26 Mar 2005 17:40:30 -0000 1.21
+++ updates.py 20 Nov 2005 09:15:55 -0000 1.22
@@ -417,7 +417,19 @@
self.updatesdict = updatedict
+ self.makeUpdatingDict()
+ def makeUpdatingDict(self):
+ """creates a dict of available packages -> [installed package], this
+ is to make it easier to look up what package will be updating what
+ in the rpmdb"""
+ self.updating_dict = {}
+ for old in self.updatesdict.keys():
+ for new in self.updatesdict[old]:
+ if not self.updating_dict.has_key(new):
+ self.updating_dict[new] = []
+ self.updating_dict[new].append(old)
+
def reduceListByNameArch(self, pkglist, name=None, arch=None):
"""returns a set of pkg naevr tuples reduced based on name or arch"""
returnlist = []
More information about the Yum-cvs-commits
mailing list