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

Re: texmf.cnf again



Manoj Srivastava <srivasta@debian.org> wrote:
> On Wed, 04 Jun 2003 15:18:35 +0200, Andreas Metzler <ametzler@downhill.at.eu.org> said: 
>> Manoj Srivastava <srivasta@debian.org> wrote:
>>> On Wed, 4 Jun 2003 08:24:38 +0200, Marcelo E Magallon
>>> <mmagallo@debian.org>

>>>> My point is that given the way the question is written, its
>>>> priority and default answer seem to counter its purpose.
>> [...]
>>> Given that were the defaults set differently this would be a
>>> serious bug, perhaps that says something about the purpose.

>> "tex configuration is broken for frontend=noninteractive" isn't
>> serious?

>        TeX configuration overwrote uhand crafted user config file is
> also a serious bug.

Agreed. The point is that both alternatives (default to yes/default to
no) are equally broken. - Overwrite=yes is a policy violation and
Overwrite=no _imho_ is "makes the package unsuitable for release".

>> Can't update-texmf store the information whether
>> /etc/texmf/texmf.cnf was generated by it or is user-modified in the
>> file itself (for example by keeping an md5sum in the first line) and
>> do the right thing(TM)?

>        In other words, use ucf?

If ucf can do this, yes please.

Some very simple shell skript might be enough (without providing ucf's
comfort), storing the hash in the first line after '% '.

stored_checksum=`sed -n -e '1s/^% //' -e '1p;1q' "$1"`
current_checksum=`sed -n '2,$p' "$1" | md5sum | cut -d\  -f1`
if [ "${stored_checksum}" = "${stored_checksum}" ] ; then
     echo "md5sum in first line matches contents, replacing file"
else
     echo "/etc/texmf/texmf.cnf is user modified, writing to
          /etc/texmf/texmf.cnf.generated instead"
fi
           cu andreas



Reply to: