

Debian bug report logs - #995
dpkg conffiles processing bug (?)

Package: dpkg ; Reported by: Bill Mitchell <mitchell@mdd.comm.mot.com>.
-----------------------------------------------------------------------

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Fri Jun 16 03:26:12 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
        (Smail3.1.28.1 #15) id m0sMYbL-0005z9C; Fri, 16 Jun 95 03:26 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA11059
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Fri, 16 Jun 1995 
03:24:33 -0700
Received: by bootes.cus.cam.ac.uk 
        (Smail-3.1.29.0 #36) id m0sMYXl-000BzgC; Fri, 16 Jun 95 11:22 
BST
Received: by chiark
        id <m0sMIve-0000YYZ@chiark.al.cl.cam.ac.uk>
        (Debian /\oo/\ Smail3.1.29.1 #29.32); Thu, 15 Jun 95 18:42 BST
Message-Id: <m0sMIve-0000YYZ@chiark.al.cl.cam.ac.uk>
Date: Thu, 15 Jun 95 18:42 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: Bill Mitchell <mitchell@mdd.comm.mot.com>, debian-bugs@pixar.com
Subject: Re: Bug#995: dpkg conffiles processing bug (?)
Newsgroups: chiark.mail.debian.devel
In-Reply-To: <mlist0615041916-987.iwj10@cus.cam.ac.uk>
References: <mlist0615041916-987.iwj10@cus.cam.ac.uk>

Bill Mitchell writes ("Bug#995: dpkg conffiles processing bug (?)"):
> After thinking about kermit /etc/skel files processing, I
> decided to declare those files in conffiles, init them in
> postinst if they were absent, and let let dpkg worry about
> preserving them through upgrades and deleting them on package
> removals.  It seemed logical to me, but it didn't work.

You should *either* list files in conffiles *or* process them
yourself.

If you process them yourself you need to add a postrm (if you don't
have one) and have it delete them if invoked with $1 == "purge".

> These files aren't present in the package, they're built in
> the postinst if they're needed.  I had hoped that declaring
> them as conffiles would get them preserved through an upgrade
> if they were present at upgrade time, but they're apparently
> de-installed when the old package is removed -- they're there
> pre-upgrade but absent when the postinst runs.

Declaring them as conffiles is interfering with your manual processing
- I wouldn't do it if I were you.

conffiles really works best for files that the package maintainer
expects most users to use unchanged or that they expect not to have to
change much themselves.  A good example is /etc/init.d/<foo>; a bad
example is /etc/smail/config (which for this reason isn't listed as a
conffile).

This should all be documented better, and there are some infelicities
in the current conffiles handling.  Please bear with me - ETA for the
alpha of the new C dpkg is now 2 weeks.

Ian.
-----------------------------------------------------------------------
Acknowledgement sent to iwj10@cus.cam.ac.uk (Ian Jackson) :
Extra info received and forwarded. Full text available.
-----------------------------------------------------------------------
Information forwarded to debian-devel@pixar.com :
Bug#995 ; Package dpkg . Full text available.
-----------------------------------------------------------------------

Message received at debian-bugs:


From mdd.comm.mot.com!mitchell Wed Jun 14 20:09:48 1995
Return-Path: <mitchell@mdd.comm.mot.com>
Received: from pixar.com by mongo.pixar.com with smtp
        (Smail3.1.28.1 #15) id m0sM5JT-000525C; Wed, 14 Jun 95 20:09 PDT
Received: from motgate.mot.com by pixar.com with SMTP id AA12775
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Wed, 14 Jun 1995 
20:08:19 -0700
Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by 
motgate.mot.com (8.6.11/8.6.10/MOT-3.7) with ESMTP id WAA11509 for 
<debian-bugs@pixar.com>; Wed, 14 Jun 1995 22:09:44 -0500
Received: from mdd.comm.mot.com (mdisea.mdd.comm.mot.com 
[138.242.64.201]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.7) with SMTP id 
WAA27192 for <debian-bugs@pixar.com>; Wed, 14 Jun 1995 22:09:43 -0500
Received: from bb29c.mdd.comm.mot.com by mdd.comm.mot.com (4.1/SMI-4.1)
        id AA01414; Wed, 14 Jun 95 20:09:42 PDT
Received: by bb29c.mdd.comm.mot.com (4.1/SMI-4.1)
        id AA12936; Wed, 14 Jun 95 20:09:37 PDT
Date: Wed, 14 Jun 1995 20:09:36 -0700 (PDT)
From: Bill Mitchell <mitchell@mdd.comm.mot.com>
X-Sender: mitchell@bb29c
To: debian-bugs@pixar.com
Subject: dpkg conffiles processing bug (?)
Message-Id: <Pine.SUN.3.91.950614200021.12927A-100000@bb29c>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


PACKAGE:  dpkg
VERSION:  0.93.42
PACKAGE_REVISION:  0

After thinking about kermit /etc/skel files processing, I
decided to declare those files in conffiles, init them in
postinst if they were absent, and let let dpkg worry about
preserving them through upgrades and deleting them on package
removals.  It seemed logical to me, but it didn't work.

These files aren't present in the package, they're built in
the postinst if they're needed.  I had hoped that declaring
them as conffiles would get them preserved through an upgrade
if they were present at upgrade time, but they're apparently
de-installed when the old package is removed -- they're there
pre-upgrade but absent when the postinst runs.

I looked at /var/lib/dpkg/status, and they're listed as conffiles
there.  I'm holding off uploading my kermit upgrade for now in
case I misunderstand intended dpkg conffiles processing.

mitchell@mdd.comm.mot.com (Bill Mitchell)


-----------------------------------------------------------------------
Acknowledgement sent to Bill Mitchell <mitchell@mdd.comm.mot.com> :
New bug report received and forwarded. Full text available.
-----------------------------------------------------------------------
Report forwarded to debian-devel@pixar.com :
Bug#995 ; Package dpkg . Full text available.
-----------------------------------------------------------------------
Ian Jackson / iwj10@thor.cam.ac.uk , with the debian-bugs tracking
mechanism
This page last modified 06:43:02 GMT Wed 21 Jun