[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))



>>>>> "Oliver" == Oliver Elphick <olly@lfix.co.uk> writes:
  
    Oliver> Does dpkg not consider removal of a conffile to be a
    Oliver> change?

I believe so.

    >> Could that be the problem?  In that case it would be fixed by
    >> actually purging the package.
    >> 
    >> (This could be a fairly generic problem -- since apt-get remove
    >> doesn't purge, any sysadmin who "cleans up" the /etc directory
    >> will get into this situation with a lot of packages.)

    Oliver> It sounds like a dpkg bug, then.  Is it?

(note: I have no idea if this was the problem in the original bug)

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.

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.

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

To answer my own question: I guess if you lost the contents of /etc
(eg accidental "rm -rf /etc", disk corruption, etc), you would hope
that reinstalling the packages would restore the conffiles again. In
fact, you would hope this could be done without removing the package
first.

I guess that there really is no good solution to this.

One suggestion:

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

That isn't so clean for doing ls -l /etc/pam.d, but it would work, and
would allow dpkg to automatically install a conffile if the current
copy is missing.

Would it break anything though? (other then my current PAM setup
<grin>)

Anyway, just my thoughts. I don't feel to strongly about this, just as
long as nothing breaks my PAM setup with prior-warning ;-).
-- 
Brian May <bam@debian.org>



Reply to: