[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GHC 6.10.1 uploaded to experimental

Em Ter, 2009-02-03 às 21:36 +0100, Joachim Breitner escreveu:
> Hi,
> Am Dienstag, den 03.02.2009, 17:58 -0200 schrieb Marco Túlio Gontijo e
> Silva:
> > I think the problem here was that the package was installed with dpkg
> > -i, and the other were not removed before ghc6.  A solution to this
> > would be not to exit with an error from prerm when this kind of thing
> > happens, maybe using || true in the call to ghc-pkg.
> > 
> > What do you think?
> yes, we should thrive to more robust maintainer scripts. Especially
> prerm should not fail if ghc-pkg believes that the package is not there.
> Remember that maintainer scripts are supposed to be idempotent, i.e. if
> run twice, nothing should happen. Obviously, a prerm script that fails
> if the cabal package has been removed already is not idempotent.
> Note that haskell-devscripts’s prerm does exactly that, using || true.
> Maybe you can use their devscripts, to reduce diversity?

I just noticed that I've made a patch here, to add in the next upload.
I think it's better than using || true, what do you think?

        ${GHC_PKG} describe @PKG@-@VERSION@ &> /dev/null \
            && ${GHC_PKG} unregister @PKG@-@VERSION@



Reply to: