[389-devel] Please review: auto upgrade during rpm posttrans
Rich Megginson
rmeggins at redhat.com
Tue Oct 6 02:37:28 UTC 2009
It is a problem that upgrade is not run automatically during rpm
installation. It causes problems for other packages that depend on
389. This fix allows rpm to run the upgrade script. Some notes:
* had to write scriptlets in lua to allow data to be passed among
different phases - %posttrans does not know if it is being run as a
fresh install or an upgrade, so we have to get that information from
%post to pass to %posttrans
* upgrade must be run in posttrans - in %post, the old package that is
being upgraded will still be around - this includes the old schema in
the schema dir - the update script assumes the contents of the schema
dir are correct and current - so we have to wait until %posttrans when
the schema dir will contain only the new schema
* the upgrade script can only run non-interactively if the servers are
all shutdown first - so we have to shutdown the servers, run the
upgrade, then start the servers back up - however, if the user did not
want certain servers to be running, we first get a list of the running
servers, and only start those back up after the upgrade
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20091005/b890da61/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3258 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20091005/b890da61/attachment.bin>
More information about the Fedora-directory-devel
mailing list