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

Re: dpkg: File missing at postinst (Re: Bug#98419: Postgresql on sid (fwd))



On 23-May-01, 06:20 (CDT), Brian May <bam@debian.org> wrote: 
> >>>>> "Oliver" == Oliver Elphick <olly@lfix.co.uk> writes:
>   
> The problem is that there are two conflicting requirements for
> conffiles:
> 
> 1. If I delete /etc/pam.d/xscreensaver (a conffile), so that
> /etc/pam.d/other gets used instead, I don't want it getting
> reinstalled again (as the default file will break my LDAP setup). Last
> I tried, dpkg asked my permission to reinstall the changed file
> first. This is what I expect.

This only happens when the conffile has been changed by the maintainer
since you last installed/upgraded.

> 
> 2. Other times, it is considered an error if the conffile doesn't
> exist, but dpkg has no way of knowing why the user manually deleted
> the file. So it assumes that the user knew what he/she was doing, and
> keeps the file deleted. Which causes other problems.

This is what happens when the conffile has not been changed.

> So, I have to ask: Why would you want to remove (not purge) a package,
> and then manually delete the config files?

Hypothetical: because you used 'apt-get remove foo' (no --purge), and
then later noticed the conffile in /etc and thought "Hey, I don't need
that anymore" and rm'd it. But since dpkg thinks the conffile is still
installed, it won't replace it when you re-install.

> One suggestion:
> 
> Make "treat-deleted-config" files obsolete/unsupported and require the
> use of empty files instead?

That would require significant changes in the semantics of certain
programs. For example, with cron/crontab, the existence of an
empty /etc/cron.allow file means something very different than no
/etc/cron.allow file at all.

A better choice would be for dpkg to recognize the special case of a
re-install with a missing conffile, and offer to install it. I've no
idea if this is feasible...

Steve

-- 
Steve Greenland <stevegr@debian.org>
(Please do not CC me on mail sent to this list; I subscribe to and read
every list I post to.)



Reply to: