On 4/25/07, Jeremy Katz <[EMAIL PROTECTED]> wrote:
Okay, simpler case is cpio.
What's happening is that I have multiple kernels installed. We
overwrite the kernel provs in goneprovs and thus only check with one of
their provides, not both. Which then leads to results which leave out
the fact that libraw1394 depends on the newer of the two kernels I have
installed.
Good catch!
I've updated the patch. Now instead of constructing goneprovs and
gonefiles as dicts with goneprovs[name] = prov
I do goneprovs[prov] = 1 and when we need the name we get it as
prov[0] this avoids the issue you mentioned and probably saves a few
bytes of memory as well ;-)
BTW I noticed that the behaviour still isn't 100% correct (also in
vanilla yum) on my machine yum is happy to remove kmod-nvidia-96xx
while leaving xorg-x11-drv-nvidia-96xx which depends on
nvidia-96xx-kmod >= 1.0.9631. This is probably because the erase code
checks for exact matches and not for >= and <= matches.
Also there is quite a large difference in the packages removed for
smart erase bash compared to yum erase bash (but I still need to
figure out whether this is due to a fault in smart or in yum).
Greets,
Gijs
Index: depsolve.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/depsolve.py,v
retrieving revision 1.163
diff -u -r1.163 depsolve.py
--- depsolve.py 24 Apr 2007 21:02:50 -0000 1.163
+++ depsolve.py 25 Apr 2007 16:34:51 -0000
@@ -758,6 +758,8 @@
# ((name, version, release), (needname, needversion), flags, suggest, sense)
+ goneprovs = {}
+ gonefiles = {}
ret = []
for txmbr in self.tsInfo.getMembers():
@@ -772,9 +774,10 @@
if txmbr.output_state in TS_INSTALL_STATES:
ret.extend(self._checkInstall(txmbr))
elif txmbr.output_state in TS_REMOVE_STATES:
- ret.extend(self._checkRemove(txmbr))
+ self._updateRemove(txmbr,goneprovs,gonefiles)
self.dcobj.already_seen[txmbr] = 1
+ ret.extend(self._checkRemove(goneprovs,gonefiles))
return ret
def resolveDeps(self):
@@ -985,7 +988,7 @@
return ret
- def _checkRemove(self, txmbr):
+ def _updateRemove(self, txmbr, goneprovs, gonefiles):
po = txmbr.po
provs = po.returnPrco('provides')
@@ -1003,11 +1006,7 @@
for f in newpo.filelist:
newpoprovs[(f, None, (None, None, None))] = 1
- ret = []
self._removing = []
- goneprovs = {}
- gonefiles = {}
- removes = {}
# iterate over the provides of the package being removed
# and see what's actually going away
@@ -1019,18 +1018,22 @@
if newpoprovs.has_key(prov):
continue
if not prov[0][0] == "/":
- goneprovs[prov[0]] = prov
+ goneprovs[prov] = 1
else:
- gonefiles[prov[0]] = prov
+ gonefiles[prov] = 1
+ def _checkRemove(self, goneprovs, gonefiles):
+ removes = {}
+ ret = []
# now see what from the rpmdb really requires these
- for (provname, prov) in goneprovs.items() + gonefiles.items():
+ for prov in goneprovs.keys() + gonefiles.keys():
+ provname = prov[0]
instrequirers = []
for pkgtup in self.rpmdb.whatRequires(provname, None, None):
instpo = self.getInstalledPackageObject(pkgtup)
instrequirers.append(instpo)
- self.verbose_logger.log(logginglevels.DEBUG_4, "looking to see what requires %s of %s", prov, po)
+ #self.verbose_logger.log(logginglevels.DEBUG_4, "looking to see what requires %s of %s", prov, po)
removes[prov] = self._requiredByPkg(prov, instrequirers)
# now, let's see if anything that we're installing requires anything
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel