Re: /etc/ question
On Sat, Feb 24, 2001 at 10:42:38PM -0300, Henrique M Holschuh wrote:
> On Sun, 25 Feb 2001, Julian Gilbey wrote:
> > On Fri, Feb 23, 2001 at 03:57:33PM -0800, Sean 'Shaleh' Perry wrote:
> > > in your preinst, check for /etc/foo and if it exists, mkdir /etc/package and
> >
> > Perhaps better: copy it in the postinst, remove the old version in the
> > postinst. Then if any problems arise, the original version will still
> > be present.
>
> BAD idea. This will defeat the conffile change detection engine in dpkg, and
> will cause problems in some cases. Don't do that.
Oops, typo! Thanks for spotting it. Read as follows:
Perhaps better: copy it in the PREINST, remove the old version in the
postinst. Then if any problems arise, the original version will still
be present.
> In the *pre*inst, mv old -> new IFF old exists and new does NOT exist
Good.
> In the posinst, just use the new location.
> Remember to correctly unwind, moving the conffile back to its original place
> (as long as the original file does not exist) in the abort-install and
> abort-upgrade targets of preinst, postrm and postinst. [never tried this,
> but that seems to be what's needed from the not-so-clear policy chapter 6]
Agreed it's not so clear. I want to figure out what questions to ask
Wichert about what it says. I'm confused about when error unwinding
is done and would like to clarify it.
> > If you are really careful, you should also move them back if the
> > package is being downgraded to a pre-move version. Check policy to
> > see how the maintainer scripts are run.
>
> Yes, that might be a good idea. However, as a rule of thumb, downgrading is
> not supported (do note that failed/aborted upgrades ARE supported).
It isn't? I thought we tried to as much as possible.
Julian
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
Debian GNU/Linux Developer, see http://people.debian.org/~jdg
Donate free food to the world's hungry: see http://www.thehungersite.com/
Reply to: