What Verifying actually does?

James Antill james at fedoraproject.org
Thu Nov 13 19:16:28 UTC 2014


On Thu, 2014-11-13 at 17:15 +0100, Lubomir Rintel wrote:
> On Thu, 2014-11-13 at 16:10 +0100, Miroslav Suchý wrote:
> > On 11/07/2014 05:09 PM, James Antill wrote:
> > >   It's inside yum, after the transaction runs, in a function called
> > > verifyTransaction().
> > >   The two main parts of it are making sure that each transaction member
> > > that was supposed to be installed was actually installed (and dito. for
> > > those that were supposed to be removed), and installing/removing the
> > > yumdb information.
> > 
> > OK. Sounds good to me for testing purposes to make sure that code is all right.
> > But why we have this in production code?
> 
> I thought it's that RPM does not guarantee that the transaction will go
> as planned. E.g. a scriptlet (%preun I think?) can fail and cause the
> old package not to be removed, resulting in a duplicate being present
> once the transaction is finished.
> 
> This way yum has a chance to report that something went terribly wrong.

 Yes, this. The verification isn't an assert, it's a test.
 At the very simplest think of the case where you run a transaction to
install a bunch of packages totaling 1GB in size and you have 2GB
free ... then just after rpm starts the transaction something else uses
1.5GB of space.
 There is nothing rpm can do here, and it isn't ACID so what we'll get
back is that a bunch of things failed to install.



More information about the Yum-devel mailing list