[yum-cvs] yum/rpmUtils __init__.py,1.23,1.24
Seth Vidal
skvidal at login.linux.duke.edu
Mon Jun 20 04:19:08 UTC 2005
Update of /home/groups/yum/cvs/yum/rpmUtils
In directory login:/tmp/cvs-serv28490/rpmUtils
Modified Files:
__init__.py
Log Message:
make the header-by-index check work properly on older versions of rpm
Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/rpmUtils/__init__.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- __init__.py 19 Jun 2005 06:32:17 -0000 1.23
+++ __init__.py 20 Jun 2005 04:19:06 -0000 1.24
@@ -61,12 +61,15 @@
self.match_on_index = 1
try:
- mi = self.ts.dbMatch(0, 1)
+ # we need the find a known index so we can test if
+ # rpm/rpm-python allows us to grab packages by db index.
+ mi = self.ts.dbMatch()
hdr = mi.next()
- except TypeError, e:
+ known_index = mi.instance()
+ mi = self.ts.dbMatch(0, known_index)
+ hdr = mi.next()
+ except (TypeError, StopIteration), e:
self.match_on_index = 0
- except StopIteration, e:
- pass
else:
self.match_on_index = 1
More information about the Yum-cvs-commits
mailing list