rpm spec - Is it safe to verify the RPM that has just been installed from a %posttrans? -


i know non-standard, it's intended overcome short term problem proprietary distribution. because there dependencies unique our deployment systems, have compile libraries %post. because failing here result in corruption rpm database, fail silently or put more accurately, fail :-/

using %verifyscript, able verify if compilation incomplete , exit appropriately. idea can this:

rpm -uvvvh proprietary-dist-1.0-2.i686.rpm rpm --verify proprietary-dist || rpm -uvvvh proprietary-dist-1.0-1.1686.rpm 

or this:

rpm -uvvvh proprietary-dist-1.0-2.i686.rpm rpm --verify proprietary-dist || rpm --rollback proprietary-dist 

however, making use of %posttrans, figured simplify down to:

rpm -uvvvh proprietary-dist-1.0-2.i686.rpm || rpm --rollback proprietary-dist 

it seems unclear documentation whether exiting non-zero %posttrans safe , won't cause rpmdb corruption - well, @ least documentation says shouldn't exit non-zero pre-dates when %pretrans , %posttrans introduced.

i assuming %posttrans run after rpmdb has been updated , committed, in effect, rpm considered installed. bad assumption?

yes correct %posttrans run after rpmdb updated (there no commit in rpm using). meanwhile rpmdb still open, , fsync(2) disabled (for performance).

non-zero %posttrans @ best ignored, otherwise leave "unsuccessful" partial install need "fixed" manually.

ymmv. if rpm breaks using %posttrans, keep pieces.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -