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

Bug#163657: dpkg: should support conffile hijacking



Package: dpkg
Version: 1.10.4
Severity: wishlist

Suppose you have a package, foo, with conffile /etc/foo,
and it is replaced by package foo2, which handles /etc/foo
by means of maintainer scripts.

The following problem arises:
   1. Remove (not purge) foo
   2. Install foo2
   3. Purge foo
The last step purges /etc/foo, even though this is now
managed by foo2!

At present, policy says that foo2 shouldn't touch /etc/foo,
since it is a conffile (belonging to foo).  However, there
are cases where one wants to switch from managing some
configuration file, perhaps one with a standard name, the
conffile way to managing it the maintainer script way.
One such case is bsd-ftpd, which replaces ftpd.
(See #68703.)  To support this, it would appear that dpkg
needs to be extended.

There are different ways to do this.  One way is to add
a field to the control file which declares that a package
will use a certain filename for configuration purposes.
The presence of this field in foo2's control file, e.g.,
    Config-Files: /etc/foo
would cause dpkg to remove /etc/foo from foo's list of
conffiles.  Then, /etc/foo would not be deleted when foo
was purged.

Alternatively, a new field could be invented that declared
a stronger conflict that Conflicts: does -- namely, a
conflict that requires purging of the conflicting package
before installation of the replacing one.

--
Thomas Hood

-- System Information:
Debian Release: 3.0
Architecture: i386
Kernel: Linux thanatos 2.4.20-pre8-ac1 #1 Mon Sep 30 10:20:53 CEST 2002 i686
Locale: LANG=C, LC_CTYPE=

Versions of packages dpkg depends on:
ii  dselect                       1.10.4     a user tool to manage Debian packa
ii  libc6                         2.2.5-14.2 GNU C Library: Shared libraries an

-- no debconf information




Reply to: