[Yum-devel] show-leaves and "RPMDB has been altered" warnings

James Antill james at fedoraproject.org
Wed Oct 28 03:16:20 UTC 2009


On Tue, 2009-10-27 at 22:27 +0200, Ville Skyttä wrote:
> Hello,
> 
> With the show-leaves plugin enabled, every yum transaction prints a "RPMDB has 
> been altered since the last yum transaction" warning.  So I suppose 
> conduit.getRpmDB().returnLeafNodes() in the plugin's pretrans and posttrans 
> does something that causes the rpmdb version to change even though it 
> internally uses rpmUtils' "read only" transaction.  Is there something the 
> show-leaves plugin could sanely do about this?

 This fixes it for me, but the real fix needs more work:

diff --git a/rpmUtils/transaction.py b/rpmUtils/transaction.py
index 64a272f..df9bebb 100644
--- a/rpmUtils/transaction.py
+++ b/rpmUtils/transaction.py
@@ -122,6 +122,8 @@ class TransactionWrapper:
             
         # prebuild the req dict
         for h in mi:
+            if h['name'] == 'gpg-pubkey':
+                continue
             if not h[rpm.RPMTAG_REQUIRENAME]:
                 continue
             tup = miscutils.pkgTupleFromHeader(h)    
@@ -144,6 +146,8 @@ class TransactionWrapper:
                 yield prov
 
         for h in mi:
+            if h['name'] == 'gpg-pubkey':
+                continue
             preq = 0
             tup = miscutils.pkgTupleFromHeader(h)
             for p in _return_all_provides(h):

...patch comming in 3, 2, 1...


More information about the Yum-devel mailing list