Re: Policy, updmap --enable and updmap.cfg in /etc or /var
- To: Florent Rougon <florent.rougon@free.fr>
- Cc: debian-tetex-maint@lists.debian.org
- Subject: Re: Policy, updmap --enable and updmap.cfg in /etc or /var
- From: Frank Küster <frank@debian.org>
- Date: Mon, 25 Oct 2004 22:55:49 +0200
- Message-id: <[🔎] 87y8hujz56.fsf@alhambra.bioz.unibas.ch>
- In-reply-to: <[🔎] 87d5zz5tcz.fsf@florent.maison> (Florent Rougon's message of "Mon, 04 Oct 2004 00:28:44 +0200")
- References: <9b31b6be04091313594083261f@mail.gmail.com> <87ekl2sakm.fsf@alhambra.bioz.unibas.ch> <9b31b6be040916170727bbeb6b@mail.gmail.com> <9b31b6be04091617087984a26b@mail.gmail.com> <20040918140312.GA12371@preusse-16223.user.cis.dfn.de> <9b31b6be04091903292c9d2be8@mail.gmail.com> <87hdpuma3y.fsf@alhambra.bioz.unibas.ch> <877jqluh1y.fsf@alhambra.bioz.unibas.ch> <20040924083844.GB1740@preusse> <87mzzgvx7e.fsf@alhambra.bioz.unibas.ch> <20040924123029.GA1668@preusse> <87wtyjdc51.fsf@alhambra.bioz.unibas.ch> <87d60bd9ou.fsf_-_@alhambra.bioz.unibas.ch> <87mzz8df4b.fsf@florent.maison> <87u0tfj31q.fsf@alhambra.bioz.unibas.ch> <87is9vfnnk.fsf@florent.maison> <[🔎] 87655utzin.fsf@alhambra.bioz.unibas.ch> <[🔎] 87d5zz5tcz.fsf@florent.maison>
Hi Florent,
Florent Rougon <f.rougon@free.fr> wrote:
> I'll simply attach
> the lmodern maintainer scripts with the comments removed (and one
> placeholder explained) so that you can get an idea of the simplicity (or
> complexity), of the process (there are many comments, so they make the
> files much bigger than they really are). Of course, if you want more
> info on the code, you have the versions with all the comments in your
> /var/lib/dpkg/info or in the Debian archive.
I had a look at this. You write in the comment of preinst:
# Unfortunately, we are in preinst, so the package is not unpacked
# yet, so we cannot simply copy $REF_CONFIG_FILE to
# $TEMP_CONFIG_FILE. And I cannot do that in postinst because it
# seems there is no way in postinst to know whether the previous
# state was "purged" (not simply "removed").
I do not see why it is necessary to know that. Why not do something like
the following in postinst:
if [ ! -f $CONFIG_FILE ]; then
# the config file does not exist (i.e. not simply an upgrade).
if [ -f $TEMP_CONFIG_FILE ]; then
# an old version was in state rc, and the config file is wanted
if [ ! -f $NO_CONFIG_FILE ]; then
mv "$TEMP_CONFIG_FILE" "$CONFIG_FILE"
else
echo >&2 <<EOF
Error:
...
EOF
fi
elif [ -f $NO_CONFIG_FILE ]; then
# an old version is present, but the local admin does not want the file
:
else
# no old version present
cp $REF_CONFIG_FILE $CONFIG_FILE
fi
fi
rm -f $NO_CONFIG_FILE
Even if the preinst script is generated anyway (as I'm currently testing
for tetex-3.0), I would prefer to copy the file from
/usr/share/$package.
Regards, Frank
--
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer
Reply to: