[Yum-devel] show-leaves and "RPMDB has been altered" warnings
James Antill
james at fedoraproject.org
Wed Oct 28 16:31:42 UTC 2009
On Wed, 2009-10-28 at 17:40 +0200, Ville Skyttä wrote:
> On Wednesday 28 October 2009, James Antill wrote:
> > 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:
>
> Wow, how did you come up with this? I tested your full patch[0] and it gets
> rid of the warnings for me too, but I can't think of a reason why avoiding
> reading gpg pubkeys would have that kind of an effect.
When all the pkgs in the rpmdb have been loaded, returnPackages() just
calls self._idx2pkg.values() ... which is just a cache of what has
called _makePackageObject().
gpg-pubkey entries are skipped in the non-cached load of
returnPackages(), so when simpleVersion() calls returnPackages() what it
gets is different depending on if the gpg-pubkey "packages" have been
loaded or not.
More information about the Yum-devel
mailing list