rpm transaction test and subsequent installation results in unexpected behavior on el4 using python rpm apis

Joe Ebmeier ebmeierj at iivip.com
Tue Feb 8 19:31:43 UTC 2011


Hello

 

I'm running this on two systems: one is CentOS 4.4 running rpm 4.3.3 and the
other is CentOS 5.3 running rpm 4.4.2.3.  Both are running Python 2.7.

 

I have a script which creates a transaction set of a single rpm to install.
It sets the test flag and runs the rpm to check for any errors.  If
successful, it then unsets the test flag and tries to run the transaction
again.

 

On the 5.3 system the behavior is as expected: the rpm gets installed.

 

On the 4.4 system, the rpm never gets installed (the "RPMCALLBACK_TRANS*"
callbacks get called but the "RPMCALLBACK_INST*" callbacks don't). If I
remove the "run" line which executed the test, everything works fine and the
rpm is installed.

 

My guess is that for the el4 version, something has been set in the
transaction object which indicates that it has already run and the
subsequent call to run the transaction will not allow it to run again.  Does
this sound plausible?  Am I using the transactionSet object correctly?  If
so, is there a workaround for this or do I need to keep two transactionSets.
one to test and one to run?

 

Thanks,

Joe

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20110208/3583b2e3/attachment.html>


More information about the Rpm-list mailing list