[Yum-devel] Bug in rpmUtils whatProvides?
Gijs Hollestelle
g.hollestelle at gmail.com
Wed Apr 20 17:48:20 UTC 2005
Hi all,
I'm working on a leave-node finder for yum-utils, while playing with
yum's functions that access to local rpm db, I think I found a bug in
rpmUtils. rpmUtils has a function that you can use to find local
packages providing a certain requirement, but this does not always
work correctly:
If a package requires something by version and something provides that
without a version this should be a correct match, an example of this
is
subversion requires perl(Getopt::Long) >= 2.25 and perl provides
perl(Getopt::Long) without a version number.
But in the current implementation it does not, I have made a 1 line
patch that should fix this, but I just wanted to make sure it's okay
before I commit it.
BTW about the leaf-node finder I can very easily (+/- 5 lines of code)
add support to report missing dependencies in the users local rpmdb
(for example caused by installing or removing packages with --nodeps)
should I include this or should it be in an other util?
Greets,
Gijs
Patch:
Here matchtuple is a provides by a package in the local rpmdb with the
same name as the requested requires.
RCS file: /home/groups/yum/cvs/yum/rpmUtils/__init__.py,v
retrieving revision 1.21
diff -u -r1.21 __init__.py
--- __init__.py 15 Jan 2005 05:22:43 -0000 1.21
+++ __init__.py 20 Apr 2005 17:40:20 -0000
@@ -277,7 +277,7 @@
match_r = pkg_r
matchtuple = (match_n, match_a, match_e, match_v, match_r)
- if miscutils.rangeCheck(provtuple, matchtuple):
+ if miscutils.rangeCheck(provtuple, matchtuple) or
(match_v == None):
matches.append(pkgtuple)
del matchingHdrs
return miscutils.unique(matches)
More information about the Yum-devel
mailing list