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

Re: conffile resurrection...



Hallo Norbert,

Frank Küster <frank@debian.org> wrote:

> Ralf Stubner <ralf.stubner@web.de> wrote:
>
>> BTW, a little later I updated my etch + texlive-2005 system to use the
>> texlive-2007 backports. No problems so far but a minor glitch. I got
>> warnings like this:
>>
>> ,----
>> | It looks like /etc/texmf/tex/generic/config/pdftexconfig.tex has been removed.
>> | In most cases this is a consequence of bug #420390.
>> | We are reinstatiating this config file.
>> | If you *really* want this to be removed, do it again,
>> | but beware of the consequences.
>> `----
>>
>> This system never had tetex installed, so #420390 does not apply
>> here. But in texlive-2005 pdftexconfig.tex et al. where installed in
>> /usr/share/texmf-texlive. Is it possible to catch this situation
>> during the upgrade process?
>
> Hm, probably we could check whether there's a previously configured
> version of texlive < 2007.  In this case it doesn't matter whether
> tetex-base was purged or not.

The fix we need to make would be in preinst.  I propose the following
fix:

-      if [ -n "$version" ]; then
+      if [ -n "$version" ] && dpkg --compare-versions "$version" lt 2007; then
	# there is a previous version, we are actually upgrading 
        # (or reinstalling)
        # in case we handle a foreign conffile (different package) $dodelete
        # can be set to 0 (or != 1) in which case the .preinst-deleted file
        # will not be created.
        if [ "$dodelete" = 1 ] ; then
          mkdir -p $(dirname "$new")
          touch $new.preinst-deleted
        fi
      fi

In other words, even if we take over a conffile and $dodelete is 1, we
only create the preinst-deleted file when we are upgrading from
something younger than 2007.  If we're upgrading from 2005-*, purging
tetex-base would have had no effect.

Or am I missing anything?

Regards, Frank
-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Reply to: