[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Fedora-haskell-list] Revised Haskell Guidelines 2008.08.13
- From: Tom Moertel <tmoertel gmail com>
- To: Jens Petersen <petersen redhat com>
- Cc: Discussion of RPM packaging standards and practices for Fedora <fedora-packaging redhat com>, fedora-haskell-list redhat com
- Subject: Re: [Fedora-haskell-list] Revised Haskell Guidelines 2008.08.13
- Date: Fri, 22 Aug 2008 10:15:32 -0400
Jens Petersen wrote:
I don't quite understand %ghc_preinst_script and %ghc_postun_script: why
do we need them?
Here's the rationale for those bits:
http://www.serpentine.com/blog/2007/02/20/haskell-cabal-now-with-extra-crunchy-rpm-goodness/#comment-20132
Quoting:
Let me point out a wrinkle I encountered when registering
RPM-installed packages with GHC. When upgrading an RPM file that
contains the same Cabal name+version of a package as the
previously installed version (say with only an RPM release being
different), the %pre, %post, %preun, and %postun scripts will all
be asking GHC to register/unregister what it thinks are the same
library. As a result, when the %preun script is called, which
occurs *after* the new package is installed but before the old
package is removed, its unregister script will actually unregister
the newly installed library, leaving the new library unregistered
with GHC.
To test for the problem, take the existing spec file for an
already-installed package, bump its RPM release, rebuild the RPMs,
and then try to upgrade to the new version. After the upgrade, GHC
will no longer know about the package.
To avoid this problem, I’ve worked out the following spec-script
dance...
Cheers,
Tom
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]