[Fedora-packaging] Upgrading databases as part of the RPM postinst script?

Nicolas Mailhot nicolas.mailhot at laposte.net
Wed May 9 08:44:44 UTC 2007


Le Mer 9 mai 2007 10:28, Gianluca Sforna a écrit :

> Now I proposed upstream the addition of a script for performing the
> same updates from the command line, so I could add it in a scriptlet:
> of course it could fail for many reasons, but if you have a working
> installation then the configuration files has all the information
> required to connect to the database.

This kind of script is very dangerous to run from a scriplet,
especially if the operations behind are not designed to be run
unattended or output info that must be checked by the admin.

Even if it works most of the time, if there is a significant risk of
total or partial failure (the real dangerous one) it should not be
scriplet-run. Getting updates to work across version jumps (someone
updating directly from Fx to Fx+2) is also tricky in a scriplet
context. You'll almost sure to hit someday a version jump or a local
database customization upstream forgot to check.

-- 
Nicolas Mailhot




More information about the packaging mailing list