Debian Bug report logs - #716948
initscripts: Removes bootlogd conf files even if bootlogd is installed

version graph

Package: bootlogd; Maintainer for bootlogd is Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>; Source for bootlogd is src:sysvinit.

Reported by: Regid Ichira <regid23@nt1.in>

Date: Mon, 15 Jul 2013 09:27:02 UTC

Severity: normal

Tags: patch

Merged with 717137, 717234, 717292, 727074

Found in version sysvinit/2.88dsf-43

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#716948; Package initscripts. (Mon, 15 Jul 2013 09:27:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christian Hofstaedtler <christian@hofstaedtler.name>:
New Bug report received and forwarded. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Mon, 15 Jul 2013 09:27:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Christian Hofstaedtler <christian@hofstaedtler.name>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: initscripts: Removes bootlogd conf files even if bootlogd is installed
Date: Mon, 15 Jul 2013 11:24:26 +0200
[Message part 1 (text/plain, inline)]
Package: initscripts
Version: 2.88dsf-42
Severity: normal

Dear Maintainer,

I've just upgraded from 2.88dsf-41, and now these files are missing:
  /etc/init.d/stop-bootlogd-single
  /etc/init.d/stop-bootlogd

Note that I do have bootlogd installed (2.88dsf-42).

Also, initscripts removed /etc/init.d/bootlogd, causing dpkg to prompt because
of a conffile modification during 'Setting up bootlogd'.

I'm attaching a (trimmed) log of the upgrade.

Thanks,
C.


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.9-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initscripts depends on:
ii  coreutils       8.20-3
ii  debianutils     4.3.4
ii  libc6           2.17-7
ii  lsb-base        4.1+Debian12
ii  mount           2.20.1-5.5
ii  sysv-rc         2.88dsf-42
ii  sysvinit-utils  2.88dsf-42

Versions of packages initscripts recommends:
ii  e2fsprogs  1.42.8-1
ii  psmisc     22.20-1

initscripts suggests no packages.

-- Configuration Files:
/etc/default/tmpfs changed [not included]

-- no debconf information
[log (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#716948; Package initscripts. (Mon, 15 Jul 2013 19:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Mon, 15 Jul 2013 19:36:04 GMT) Full text and rfc822 format available.

Message #10 received at 716948@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: Christian Hofstaedtler <christian@hofstaedtler.name>, 716948@bugs.debian.org, debian-dpkg@lists.debian.org
Subject: Re: [Pkg-sysvinit-devel] Bug#716948: initscripts: Removes bootlogd conf files even if bootlogd is installed
Date: Mon, 15 Jul 2013 12:32:04 -0700
[Message part 1 (text/plain, inline)]
Dpkg maintainers, could you please have a look at this?  I'm not sure if
this is a dpkg-maintscript-helper bug, or expected behavior that will
require bypassing dpkg-maintscript-helper to overcome.

On Mon, Jul 15, 2013 at 11:24:26AM +0200, Christian Hofstaedtler wrote:
> Package: initscripts
> Version: 2.88dsf-42
> Severity: normal

> Dear Maintainer,

> I've just upgraded from 2.88dsf-41, and now these files are missing:
>   /etc/init.d/stop-bootlogd-single
>   /etc/init.d/stop-bootlogd

> Note that I do have bootlogd installed (2.88dsf-42).

> Also, initscripts removed /etc/init.d/bootlogd, causing dpkg to prompt because
> of a conffile modification during 'Setting up bootlogd'.

These init scripts are all conffiles that previously belonged to
'initscripts' (pre-wheezy), and now belong to the 'bootlogd' package
instead.  On a continuously upgraded squeeze->wheezy system, the relevant
bits in /var/lib/dpkg/status look like this:

Package: bootlogd
Status: install ok installed
[...]
Conffiles:
 /etc/init.d/bootlogd 132a5593031c72ae09b940b49bbc0ad8
 /etc/init.d/stop-bootlogd 4544c7e1a2d0c713d29424d02faad237
 /etc/init.d/stop-bootlogd-single 648d8624e708151500c5e299a6005afe

[...]
Package: initscripts
Status: install ok installed
[...]
Conffiles:
 [...]
 /etc/init.d/stop-bootlogd-single 648d8624e708151500c5e299a6005afe obsolete
 /etc/init.d/stop-bootlogd 4544c7e1a2d0c713d29424d02faad237 obsolete
 /etc/init.d/bootlogd 267ceea04f703171e6c62f506fda3305 obsolete

In initscripts 2.88dsf-42, a debhelper .maintscript rule has been added
which does:

 rm_conffile /etc/init.d/bootlogd 2.88dsf-42 initscripts
 rm_conffile /etc/init.d/stop-bootlogd-single 2.88dsf-42 initscripts
 rm_conffile /etc/init.d/stop-bootlogd 2.88dsf-42 initscripts

In the maintainer scripts, this translates into rules such as:

 dpkg-maintscript-helper rm_conffile /etc/init.d/bootlogd 2.88dsf-42 initscripts -- "$@"

I would expect dpkg-maintscript-helper to know that these conffiles are no
longer owned by the initscripts package, and therefore not remove them.  Is
this a wrong assumption?

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#716948; Package initscripts. (Mon, 15 Jul 2013 20:03:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Mon, 15 Jul 2013 20:03:05 GMT) Full text and rfc822 format available.

Message #15 received at 716948@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: debian-dpkg@lists.debian.org
Cc: Christian Hofstaedtler <christian@hofstaedtler.name>, 716948@bugs.debian.org
Subject: Re: [Pkg-sysvinit-devel] Bug#716948: initscripts: Removes bootlogd conf files even if bootlogd is installed
Date: Mon, 15 Jul 2013 22:00:16 +0200
Hi!

On Mon, 2013-07-15 at 12:32:04 -0700, Steve Langasek wrote:
> Dpkg maintainers, could you please have a look at this?  I'm not sure if
> this is a dpkg-maintscript-helper bug, or expected behavior that will
> require bypassing dpkg-maintscript-helper to overcome.

> In initscripts 2.88dsf-42, a debhelper .maintscript rule has been added
> which does:
> 
>  rm_conffile /etc/init.d/bootlogd 2.88dsf-42 initscripts
>  rm_conffile /etc/init.d/stop-bootlogd-single 2.88dsf-42 initscripts
>  rm_conffile /etc/init.d/stop-bootlogd 2.88dsf-42 initscripts
> 
> In the maintainer scripts, this translates into rules such as:
> 
>  dpkg-maintscript-helper rm_conffile /etc/init.d/bootlogd 2.88dsf-42 initscripts -- "$@"
> 
> I would expect dpkg-maintscript-helper to know that these conffiles are no
> longer owned by the initscripts package, and therefore not remove them.  Is
> this a wrong assumption?

Yes, while suboptimal, this is the current dpkg-maintscript-helper
behavior, which is pretty basic and will not cover these kinds of corner
cases. It could well be considered a bug, but then I think the script is
a hack and a dead end, and I'm not really planning on wasting my time
working on its logic, instead I'd rather spend it improving the native
conffile support in dpkg proper. I might perhaps consider looking into
reviewing and applying tested patches if someone wanted to provide them,
but that's not a thrilling prospect either.

Thanks,
Guillem



Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#716948; Package initscripts. (Mon, 15 Jul 2013 22:27:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Mon, 15 Jul 2013 22:27:04 GMT) Full text and rfc822 format available.

Message #20 received at 716948@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: debian-dpkg@lists.debian.org, Christian Hofstaedtler <christian@hofstaedtler.name>, 716948@bugs.debian.org
Subject: Re: [Pkg-sysvinit-devel] Bug#716948: initscripts: Removes bootlogd conf files even if bootlogd is installed
Date: Mon, 15 Jul 2013 15:23:30 -0700
On Mon, Jul 15, 2013 at 10:00:16PM +0200, Guillem Jover wrote:
> On Mon, 2013-07-15 at 12:32:04 -0700, Steve Langasek wrote:
> > Dpkg maintainers, could you please have a look at this?  I'm not sure if
> > this is a dpkg-maintscript-helper bug, or expected behavior that will
> > require bypassing dpkg-maintscript-helper to overcome.

> > In initscripts 2.88dsf-42, a debhelper .maintscript rule has been added
> > which does:

> >  rm_conffile /etc/init.d/bootlogd 2.88dsf-42 initscripts
> >  rm_conffile /etc/init.d/stop-bootlogd-single 2.88dsf-42 initscripts
> >  rm_conffile /etc/init.d/stop-bootlogd 2.88dsf-42 initscripts

> > In the maintainer scripts, this translates into rules such as:

> >  dpkg-maintscript-helper rm_conffile /etc/init.d/bootlogd 2.88dsf-42 initscripts -- "$@"

> > I would expect dpkg-maintscript-helper to know that these conffiles are no
> > longer owned by the initscripts package, and therefore not remove them.  Is
> > this a wrong assumption?

> Yes, while suboptimal, this is the current dpkg-maintscript-helper
> behavior, which is pretty basic and will not cover these kinds of corner
> cases. It could well be considered a bug, but then I think the script is
> a hack and a dead end, and I'm not really planning on wasting my time
> working on its logic, instead I'd rather spend it improving the native
> conffile support in dpkg proper.

And improving the native support means what, exactly?  You can't assume that
an obsolete conffile should be removed on upgrade; some of these conffiles
are changing package owner, some of them need to be moved to a new location
on disk, some are being replaced by non-conffile config files, and some
should really be dropped.  There's no way for dpkg to know automatically
what the right thing to do is, that's why we have this in maintainer
scripts.

> I might perhaps consider looking into reviewing and applying tested
> patches if someone wanted to provide them, but that's not a thrilling
> prospect either.

I will look at fixing dpkg-maintscript-helper for this issue.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org



Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#716948; Package initscripts. (Tue, 16 Jul 2013 01:39:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Tue, 16 Jul 2013 01:39:08 GMT) Full text and rfc822 format available.

Message #25 received at 716948@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: debian-dpkg@lists.debian.org, Christian Hofstaedtler <christian@hofstaedtler.name>, 716948@bugs.debian.org
Subject: Re: [Pkg-sysvinit-devel] Bug#716948: initscripts: Removes bootlogd conf files even if bootlogd is installed
Date: Mon, 15 Jul 2013 18:37:51 -0700
[Message part 1 (text/plain, inline)]
Control: reassign -1 dpkg
Control: tags -1 patch

On Mon, Jul 15, 2013 at 03:23:30PM -0700, Steve Langasek wrote:
> > I might perhaps consider looking into reviewing and applying tested
> > patches if someone wanted to provide them, but that's not a thrilling
> > prospect either.

> I will look at fixing dpkg-maintscript-helper for this issue.

Attached is a tested patch for this.  I'm not thrilled about invoking
dpkg-query -S here, but I don't see any other way to get this information.
It also still doesn't give perfect results; if a conffile moves from package
x to package y, and package x is unpacked before package y, a modified
conffile will be left behind as <conffile>.dpkg-bak and the pristine
conffile from the new package will be unpacked in its place.  But I believe
it is at least as good as the existing code in all cases.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org
[0001-dpkg-maintscript-helper-when-a-conffile-is-no-longer.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Bug reassigned from package 'initscripts' to 'dpkg'. Request was from Steve Langasek <vorlon@debian.org> to 716948-submit@bugs.debian.org. (Tue, 16 Jul 2013 01:39:08 GMT) Full text and rfc822 format available.

No longer marked as found in versions sysvinit/2.88dsf-42. Request was from Steve Langasek <vorlon@debian.org> to 716948-submit@bugs.debian.org. (Tue, 16 Jul 2013 01:39:10 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Steve Langasek <vorlon@debian.org> to 716948-submit@bugs.debian.org. (Tue, 16 Jul 2013 01:39:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#716948; Package dpkg. (Tue, 16 Jul 2013 01:48:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Tue, 16 Jul 2013 01:48:05 GMT) Full text and rfc822 format available.

Message #36 received at 716948@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: debian-dpkg@lists.debian.org
Cc: Christian Hofstaedtler <christian@hofstaedtler.name>, 716948@bugs.debian.org
Subject: Re: [Pkg-sysvinit-devel] Bug#716948: initscripts: Removes bootlogd conf files even if bootlogd is installed
Date: Tue, 16 Jul 2013 03:44:09 +0200
On Mon, 2013-07-15 at 15:23:30 -0700, Steve Langasek wrote:
> On Mon, Jul 15, 2013 at 10:00:16PM +0200, Guillem Jover wrote:
> > Yes, while suboptimal, this is the current dpkg-maintscript-helper
> > behavior, which is pretty basic and will not cover these kinds of corner
> > cases. It could well be considered a bug, but then I think the script is
> > a hack and a dead end, and I'm not really planning on wasting my time
> > working on its logic, instead I'd rather spend it improving the native
> > conffile support in dpkg proper.
> 
> And improving the native support means what, exactly?  You can't assume that
> an obsolete conffile should be removed on upgrade; some of these conffiles
> are changing package owner, some of them need to be moved to a new location
> on disk, some are being replaced by non-conffile config files, and some
> should really be dropped.  There's no way for dpkg to know automatically
> what the right thing to do is, that's why we have this in maintainer
> scripts.

Obviously. Improving native support means that dpkg itself would handle
the logic, and track it itself, at the direction of the maintainer, and
not through an external script that does stuff under dpkg's nose and
needs to be called in multiple maintainer script actions. I've talked
about this elsewhere, but the way the maintainer would notify (once)
dpkg would be either via a new dpkg-conffile program (which I've started
already), or through the conffiles control file, which would imply no
need for any maintainer scripts.

Regards,
Guillem



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#716948; Package dpkg. (Tue, 16 Jul 2013 02:18:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Tue, 16 Jul 2013 02:18:04 GMT) Full text and rfc822 format available.

Message #41 received at 716948@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: debian-dpkg@lists.debian.org
Cc: Christian Hofstaedtler <christian@hofstaedtler.name>, 716948@bugs.debian.org
Subject: Re: [Pkg-sysvinit-devel] Bug#716948: initscripts: Removes bootlogd conf files even if bootlogd is installed
Date: Tue, 16 Jul 2013 04:15:20 +0200
On Mon, 2013-07-15 at 18:37:51 -0700, Steve Langasek wrote:
> Attached is a tested patch for this.  I'm not thrilled about invoking
> dpkg-query -S here, but I don't see any other way to get this information.

You could check instead if the package owns the conffile either with
«dpkg-query -L» or «dpkg-query -W -f='${Conffiles}\n'» (non-obsolete
entries). Also the check could be refactored into a new function.

With these fixed I'll merge it for 1.17.0.

> It also still doesn't give perfect results; if a conffile moves from package
> x to package y, and package x is unpacked before package y, a modified
> conffile will be left behind as <conffile>.dpkg-bak and the pristine
> conffile from the new package will be unpacked in its place.  But I believe
> it is at least as good as the existing code in all cases.

I'm not going to ponder how this could be fixed with the script, but
that's one of the reasons native support would solve stuff like this,
as the desired action would be tracked in the dpkg database, and the
files would use the standard extensions.

Thanks,
Guillem



Merged 716948 717137 Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Wed, 17 Jul 2013 20:36:11 GMT) Full text and rfc822 format available.

Added indication that 716948 affects initscripts Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Wed, 17 Jul 2013 20:36:12 GMT) Full text and rfc822 format available.

Merged 716948 717137 717292 Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Fri, 19 Jul 2013 03:27:10 GMT) Full text and rfc822 format available.

Added indication that 716948 affects bootlogd Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Fri, 19 Jul 2013 03:27:10 GMT) Full text and rfc822 format available.

Merged 716948 717137 717234 717292 Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Fri, 19 Jul 2013 03:27:23 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from Raphaël Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Thu, 25 Jul 2013 23:27:04 GMT) Full text and rfc822 format available.

Message sent on to Christian Hofstaedtler <christian@hofstaedtler.name>:
Bug#716948. (Thu, 25 Jul 2013 23:27:10 GMT) Full text and rfc822 format available.

Message #56 received at 716948-submitter@bugs.debian.org (full text, mbox):

From: Raphaël Hertzog <hertzog@debian.org>
To: 716948-submitter@bugs.debian.org
Subject: Bug#716948 marked as pending
Date: Thu, 25 Jul 2013 23:24:08 +0000
tag 716948 pending
thanks

Hello,

Bug #716948 reported by you has been fixed in the Git repository. You can
see the changelog below, and you can check the diff of the fix at:

    http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=8264aa5

---
commit 8264aa556d52235157fb0c705ab8535a8d6fdd4a
Author: Raphaël Hertzog <hertzog@debian.org>
Date:   Fri Jul 26 00:17:36 2013 +0200

    dpkg-maintscript-helper: ensures file ownership before acting
    
    Fix mv_conffile/rm_confffile to not do anything when the conffile is no
    longer owned by the current (or named) package.
    
    Closes: #716948
    
    Based-on-patch-by: Steve Langasek <steve.langasek@ubuntu.com>

diff --git a/debian/changelog b/debian/changelog
index dd60733..5588f9b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -134,6 +134,11 @@ dpkg (1.17.0) UNRELEASED; urgency=low
   * Remove temporary file on error during «dpkg-divert --rename».
   * Fix value caching in Dpkg::Arch by not shadowing the variables.
 
+  [ Raphaël Hertzog ]
+  * Fix dpkg-maintscript-helper rm_conffile and mv_conffile to do nothing
+    when the conffile is no longer owned by the current (or named) package.
+    Thanks to Steve Langasek for the patch. Closes: #716948
+
   [ Updated programs translations ]
   * Fix typo in Spanish translation of update-alternatives.
     Thanks to Javier Fernandez-Sanguino <jfs@debian.org>. Closes: #713020



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#716948; Package dpkg. (Thu, 25 Jul 2013 23:39:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Thu, 25 Jul 2013 23:39:04 GMT) Full text and rfc822 format available.

Message #61 received at 716948@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Christian Hofstaedtler <christian@hofstaedtler.name>, 716948@bugs.debian.org
Cc: vorlon@debian.org
Subject: Re: [Pkg-sysvinit-devel] Bug#716948: initscripts: Removes bootlogd conf files even if bootlogd is installed
Date: Fri, 26 Jul 2013 01:35:02 +0200
Hi,

On Mon, 15 Jul 2013, Steve Langasek wrote:
> Attached is a tested patch for this.  I'm not thrilled about invoking
> dpkg-query -S here, but I don't see any other way to get this information.

As suggested by Guillem, it's better to use "dpkg-query -L pkg | grep -q
-x /path" as you only have to load the file list of one package.

I also factorized the check in a single function and I merged the
resulting patch.

FWIW the pkg-tests test-suite still passes with those changes.

> It also still doesn't give perfect results; if a conffile moves from package
> x to package y, and package x is unpacked before package y, a modified
> conffile will be left behind as <conffile>.dpkg-bak and the pristine
> conffile from the new package will be unpacked in its place.  But I believe
> it is at least as good as the existing code in all cases.

Fixing this requires cooperation from the package taking it over so I
don't see it as a regression either.

There's a separate bug tracking this scenario anyway:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595112

> @@ -197,11 +231,23 @@ prepare_mv_conffile() {
>  finish_mv_conffile() {
>  	local OLDCONFFILE="$1"
>  	local NEWCONFFILE="$2"
> +	local PACKAGE="$2"

Here there was a small bug (caught by pkg-tests since I am calling
dpkg-query -L $PACKAGE).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/



Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Sat, 27 Jul 2013 04:08:05 GMT) Full text and rfc822 format available.

Notification sent to Christian Hofstaedtler <christian@hofstaedtler.name>:
Bug acknowledged by developer. (Sat, 27 Jul 2013 04:08:05 GMT) Full text and rfc822 format available.

Message #66 received at 716948-close@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: 716948-close@bugs.debian.org
Subject: Bug#716948: fixed in dpkg 1.17.0
Date: Sat, 27 Jul 2013 04:03:03 +0000
Source: dpkg
Source-Version: 1.17.0

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 716948@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 26 Jul 2013 23:54:54 +0200
Source: dpkg
Binary: libdpkg-dev dpkg dpkg-dev libdpkg-perl dselect
Architecture: source amd64 all
Version: 1.17.0
Distribution: unstable
Urgency: low
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description: 
 dpkg       - Debian package management system
 dpkg-dev   - Debian package development tools
 dselect    - Debian package management front-end
 libdpkg-dev - Debian package management static library
 libdpkg-perl - Dpkg perl modules
Closes: 162541 163763 284664 635117 657627 659814 676664 681371 681470 684196 685096 686782 689193 691449 691745 697297 698881 699807 700177 703092 704240 707323 708292 708375 708607 710265 711647 711936 712976 713020 715334 716948
Changes: 
 dpkg (1.17.0) unstable; urgency=low
 .
   [ Guillem Jover ]
   * Switch update-alternatives back to a fatal error on out of range priority
     on --install.
   * Document dpkg-deb --debug in --help output.
   * Bump Standards-Version to 3.9.4 (no changes needed).
   * Use the new canonical dpkg git Vcs URLs.
   * Remove ancient version from zlibg1-dev Build-Depends.
   * Add compression development packages to libdpkg-dev Depends.
   * Man pages cleanup:
     - Disable justification and hyphenation in SEE ALSO sections.
     - Remove unneeded double quotes in .SH headings.
     - Do not use “header” when “format” or “field” is meant.
     - Move dangers of installing via dpkg-deb from BUGS to a NOTES section.
     - Remove BUGS sections containing obvious or misplaced information.
     - Move BUGS sections before EXAMPLES and SEE ALSO sections.
     - Place ENVIRONMENT and FILES sections contiguously.
     - Move EXIT STATUS section before ENVIRONMENT.
     - Rename CAVEATS sections to NOTES.
     - Fold BACKWARD COMPATIBILITY section into other sections.
     - Document since when DEB_*_MULTIARCH variables are supported.
     - Move compiler flags subsection from ENVIRONMENT to NOTES.
     - Unify WARNING and ERROR sections into DIAGNOSTICS.
     - Unify command-line options into a single OPTIONS section.
     - Mark programs, variables, fields and command-line options in bold.
     - Fold dpkg-architecture(1) DEBIAN/RULES section into EXAMPLES.
     - Fix dpkg-architecture(1) debian/rules usage documentation.
     - Move dpkg-buildflags(1) HARDENING into a new FEATURE AREAS subsection.
     - Improve dpkg-buildflags(1) usage documentation.
       Thanks to Matthijs Kooijman <matthijs@stdin.nl>. Closes: #657627
     - Clarify that DPKG_MAINTSCRIPT_PACKAGE is not arch-qualified.
     - Add triggers to the list of binary control information files.
       Thanks to Charles Plessy <plessy@debian.org>.
   * Use colon instead of dot for user:group in dpkg debug output.
   * Remove support for obsolete DM-Upload-Allowed from Dpkg::Vendor::Debian.
   * Fix update-alternatives to use the current alternative link as the first
     best value, to avoid flip-flops of alternatives with equal priority.
     Closes: #699807
   * Fix clang warnings due to change of alignment requirements.
   * Change copyright file to point to GPL-2 instead of GPL.
   * Do not pass -e in shell script shebangs, set it in the body.
   * Add new dpkg-parsechangelog --show-field option to print a field value.
     Closes: #284664
   * Add new dpkg-buildpackage --force-sign option.
   * By default do not sign builds for UNRELEASED uploads on dpkg-buildpackage.
     Closes: #635117
   * Also check Build-Depends-Arch for minimal versions in dpkg-shlibdeps.
     Closes: #681470
   * Document dpkg-buildflags export mode usage in man page. Closes: #691449
     Thanks to Jonathan Nieder <jrnieder@gmail.com>.
   * Rename dpkg-buildflags configure exporter to cmdline, but preserve
     configure as a legacy alias.
   * Mask fortify hardening option from dpkg-buildflags output on noopt.
     New glibc 2.16 and later, issue a warning on this condition.
     Closes: #691745
   * Refer to path instead of file on dpkg-statoverride.
   * Always print a descriptive architecture column, even for empty or missing
     architectures on «dpkg-query --list».
   * Rework SELinux code on unpack to reload the label database if it has
     changed, for example while upgrading the SELinux policy package.
   * Execute maintainer scripts in a new execution context, based on the
     current one and the specific maintainer script filename, and if it's
     not different to the current one, use "dpkg_script_t" as a fallback.
   * Do not unnecessarily create a dpkg update log record on remove or purge.
   * Always reset want status when removing or purging a package; so this
     now resets holds among others. Closes: #163763
   * Always reset want status when installing a package; so this now resets
     holds among others. Closes: #162541
   * Defer cleanup of .dpkg-new and .dpkg-tmp paths on removal to the point
     when we are definitely removing the main path.
   * Activate file triggers on removal more accurately, only when we know
     we are inevitably removing things.
   * Change dir to / before executing maintainer scripts. Closes: #686782
   * Add new dpkg-deb --deb-format option and base --new and --old on it,
     as the latter are not future-proof, and neither can be guaranteed to
     produce a reliable output file format.
   * Drop archtable. It serves no purpose, it's Debian specific, it's
     usually outdated, and everyone should be using dpkg-architecture anyway.
   * Add musl-linux support to ostable and triplettable.
     Requested-by Kevin Bortis <wermut@gmail.com>.
   * Remove update-alternatives, dpkg-divert and dpkg-statoverride
     compatibility symlinks under /usr/sbin/.
   * Remove install-info wrapper.
   * Only ignore older packages if the existing version is informative. This
     allows any program using libdpkg to parse the available file to see again
     packages with versions lesser than 0-0 (like 0~0-0). Closes: #676664
   * Fix Dpkg::Control::Hash set_options() to take a hash as argument instead
     of two scalars.
   * Add a new Dpkg::Vendor get_vendor_dir() function.
   * Print correct path to vendor directory on error message in dpkg-vendor.
   * Do not hardcode the dpkg system configuration directory in perl scripts,
     respect build time setting.
   * Deprecate Dpkg lowercase and exported by default variables, replaced by
     new unified uppercase non-exported by default ones.
   * Do not set -fstack-protector in the default build flags on arm64 (it's
     not yet supported). Thanks to Matthias Klose <doko@ubuntu.com>.
     Closes: #711936
   * Add GCJFLAGS support to dpkg-buildflags. Closes: #708375
   * Clarify that dpkg --set-selections needs an up-to-date available db,
     by documenting it on the dpkg(1) man page, and warning whenever dpkg
     finds unknown packages while setting the selections. Closes: #703092
   * Print nicer error messages in perl scripts using Getopt::Long by trapping
     $SIG{__WARN__} to call usageerr() on option parse errors.
   * Move the exit call out from usage() in dpkg-scansources so that usageerr()
     gives a correct exit code. Thanks to Bernhard R. Link <brlink@debian.org>.
   * Print correct error message on unknown dpkg-name options before --.
   * Require at least one filename on dpkg-name after --.
   * Switch program usage errors to not print entire --help output.
     Closes: #681371
   * Document that «dpkg-parsechangelog -l-» can be used to read from stdin.
   * Support parsing compressed changelog files transparently. Closes: #684196
   * Sort files inside new diffs generated by dpkg-source lexicographically.
     Closes: #689193
   * Add support for a build_arch option in Dpkg::Deps deps_parse().
     Thanks to Colin Watson <cjwatson@ubuntu.com>. Closes: #697297
   * Move epoch-less or revision-less output logic to Dpkg::Version.
     Based on a patch by Bernhard R. Link <brlink@debian.org>.
   * Catch mismatches between version strings and format versions in
     dpkg-source. Ensure that a 3.0 (quilt) package has a non-native version
     and that a 3.0 (native) package has a native version. Closes: #700177
     Thanks to Bernhard R. Link <brlink@debian.org>.
   * Add support for mipsn32(el) and mips64(el) to arch tables.
     Thanks to YunQiang Su <wzssyqa@gmail.com>. Closes: #685096, #707323
   * Document --file and --label parser options in dpkg-parsechangelog(1).
   * Add a new configure --with-dpkg-deb-compressor option to allow selecting
     the default dpkg-deb compressor, mainly for downstreams.
   * Switch dpkg-deb default compressor from gzip to xz. Build dpkg.deb using
     gzip to make debootstrap life easier on non-Debian based systems.
   * Add support for gzip compression strategies to dpkg-deb. The new
     strategies are: filtered, huffman, rle and fixed.
   * Change dpkg and dpkg-deb help output to recommend apt instead of dselect
     as a user-friendly frontend.
   * Remove temporary file on error during «dpkg-divert --rename».
   * Fix value caching in Dpkg::Arch by not shadowing the variables.
   * Fix chmod() arguments order in Dpkg::Source::Quilt. Closes: #710265
     Thanks to Pablo Oliveira <pablo@sifflez.org>.
   * Add new dpkg-shlibdeps -l option to add private shared library directories.
     This should be used instead of abusing LD_LIBRARY_PATH to pass the paths,
     which might be problematic when cross-compiling. Closes: #698881
   * Only apply empy line and comma cleanups when doing substvar replacements
     on fields where those are relevant. Closes: #659814
   * Do not scan control files twice for PGP signature presence.
 .
   [ Raphaël Hertzog ]
   * Fix dpkg-maintscript-helper rm_conffile and mv_conffile to do nothing
     when the conffile is no longer owned by the current (or named) package.
     Thanks to Steve Langasek for the patch. Closes: #716948
   * Improve dpkg-maintscript-helper behaviour in “Multi-Arch: same” packages
     by arch-qualifying package names read from the environment. Also add
     a warning about this potential problem in the manual page.
   * Fix usage of non-existent _() function in multiple places of the Perl
     code. Thanks to Lincoln Myers <lincoln@netapp.com> for the patch.
     Closes: #708607
 .
   [ Updated programs translations ]
   * Fix typo in Spanish translation of update-alternatives.
     Thanks to Javier Fernandez-Sanguino <jfs@debian.org>. Closes: #713020
 .
   [ Updated programs translations ]
   * Vietnamese (Trần Ngọc Quân). Closes: #715334
 .
   [ Added man page translations ]
   * Italian (Beatrice Torracca). Closes: #711647
 .
   [ Updated man page translations ]
   * Fix wrong translation of "fortify" in French dpkg-buildflags(1) man page.
     Thanks to Christian Perrier <bubulle@debian.org>. Closes: #712976
   * Fix typo in dpkg-source(1) man page French translation.
     Thanks to Cédric Boutillier <boutil@debian.org>. Closes: #708292
   * Japanese (TAKAHASHI Motonobu). Closes: #704240
Checksums-Sha1: 
 7d0a5389a4f986c0e5ae9cebc706d240e3780282 1365 dpkg_1.17.0.dsc
 1eefd9ba1ec7d61697faf82586ecf153b928724f 3783600 dpkg_1.17.0.tar.xz
 7b1b6154ebefd8e7175cb2f3f0bfa9625cc60292 729842 libdpkg-dev_1.17.0_amd64.deb
 44b07a9828968b3d40178a995f2f7e83e6b86630 2624194 dpkg_1.17.0_amd64.deb
 24350e9fc261b9d9fbb49b5f9fc823d6e3f416bd 1194456 dselect_1.17.0_amd64.deb
 f7e55eddd462115c403964ea96d1438093951492 1346654 dpkg-dev_1.17.0_all.deb
 44315dc84dfa31cc9a7a4c3d6240f6059f212690 984038 libdpkg-perl_1.17.0_all.deb
Checksums-Sha256: 
 67c73b04b16a2a067b6f58f463161009b9868392734bac3434d08d8248996a0f 1365 dpkg_1.17.0.dsc
 a424cae7e94c98c3f700dc40eea6bc66ab7a14183c7d6efd2992de8261701352 3783600 dpkg_1.17.0.tar.xz
 de410be6e39b77dc5b381572794412b68b9f0c1076c4c9d60b3da089ddb520af 729842 libdpkg-dev_1.17.0_amd64.deb
 d0f218a17592bf51090c9eb7209047a86170d6c8089fc9c8b685149196764bfe 2624194 dpkg_1.17.0_amd64.deb
 4d86af7e10edd35ac8232801f42293bebbf68576319b4e827de4c30ba48db9df 1194456 dselect_1.17.0_amd64.deb
 f81da86ecd9728fb52ad6452b5b121411fba2188a486338d0b51ceeb6e9b8bde 1346654 dpkg-dev_1.17.0_all.deb
 e3f3b0773b0d1cfbc68a73603ffce6f7a3fc71ca22c3e78a5aea6dfac78264aa 984038 libdpkg-perl_1.17.0_all.deb
Files: 
 9fba33b2f2fe8e4af1585bff1e5bf02c 1365 admin required dpkg_1.17.0.dsc
 7a2a1a1b82a44154a7b6791ccbec03cf 3783600 admin required dpkg_1.17.0.tar.xz
 bee0aabc337738db567c23af184ee235 729842 libdevel optional libdpkg-dev_1.17.0_amd64.deb
 6c79ea18925f5c8ec8f1d871250f2866 2624194 admin required dpkg_1.17.0_amd64.deb
 34b0f0ace57e4583f38dd271f9b3bf2f 1194456 admin optional dselect_1.17.0_amd64.deb
 1bbc56aab4c34600de3b1096c3a3a1ab 1346654 utils optional dpkg-dev_1.17.0_all.deb
 76980aced39400a69192a67247ce10fe 984038 perl optional libdpkg-perl_1.17.0_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlHzPBQACgkQuW9ciZ2SjJul9ACfWjrT9o9dyZAn71cwuK/bd1rp
wv8AnAhTjjV1EGX7v3dGkROgyG7Ws47m
=vJ2Z
-----END PGP SIGNATURE-----




Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Sat, 27 Jul 2013 04:08:06 GMT) Full text and rfc822 format available.

Notification sent to Zlatko Calusic <zcalusic@bitsync.net>:
Bug acknowledged by developer. (Sat, 27 Jul 2013 04:08:06 GMT) Full text and rfc822 format available.

Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Sat, 27 Jul 2013 04:08:07 GMT) Full text and rfc822 format available.

Notification sent to Andreas Beckmann <anbe@debian.org>:
Bug acknowledged by developer. (Sat, 27 Jul 2013 04:08:07 GMT) Full text and rfc822 format available.

Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Sat, 27 Jul 2013 04:08:08 GMT) Full text and rfc822 format available.

Notification sent to Vincent Lefevre <vincent@vinc17.net>:
Bug acknowledged by developer. (Sat, 27 Jul 2013 04:08:08 GMT) Full text and rfc822 format available.

Bug reopened Request was from Regid Ichira <regid23@nt1.in> to control@bugs.debian.org. (Wed, 31 Jul 2013 22:54:05 GMT) Full text and rfc822 format available.

Changed Bug submitter to 'Regid Ichira <regid23@nt1.in>' from 'Christian Hofstaedtler <christian@hofstaedtler.name>' Request was from Regid Ichira <regid23@nt1.in> to control@bugs.debian.org. (Wed, 31 Jul 2013 22:54:08 GMT) Full text and rfc822 format available.

No longer marked as fixed in versions dpkg/1.17.0. Request was from Regid Ichira <regid23@nt1.in> to control@bugs.debian.org. (Wed, 31 Jul 2013 22:54:10 GMT) Full text and rfc822 format available.

Bug reassigned from package 'dpkg' to 'bootlogd'. Request was from Regid Ichira <regid23@nt1.in> to control@bugs.debian.org. (Wed, 31 Jul 2013 22:54:13 GMT) Full text and rfc822 format available.

Marked as found in versions sysvinit/2.88dsf-43. Request was from Regid Ichira <regid23@nt1.in> to control@bugs.debian.org. (Wed, 31 Jul 2013 22:54:17 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#716948; Package bootlogd. (Thu, 01 Aug 2013 01:24:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Regid Ichira <regid23@nt1.in>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Thu, 01 Aug 2013 01:24:09 GMT) Full text and rfc822 format available.

Message #93 received at 716948@bugs.debian.org (full text, mbox):

From: Regid Ichira <regid23@nt1.in>
To: 716948@bugs.debian.org
Subject: explaining the control requests from above
Date: Thu, 1 Aug 2013 03:58:00 +0300
  For better readability, here is the 25 lines long comment from the
bottom of the control requests from above.  

Package:  bootlogd
Version:  2.88dsf-43
Severity: normal

  Not sure if severity normal is adequete.  How will the system 
react when a boot scripts are unexpectdly missing?  I am also not
sure if it should be filed against bootlogd.
  Reopen on the ground of 
http://lists.debian.org/debian-user/2013/07/msg01243.html .
Since purging and installing seem to fix the problem, perhaps after
upgrade the maintainer scripts should, at least, check and report
when a problematic file is not on place?  The issue might not be 
noticed at the time it happans.
  I started the thread at 
http://lists.debian.org/debian-user/2013/07/msg01243.html .  I can't
tell much about the circumstances the problem apeared.  This is so
becuase I used a mixture of dpkg and aptitude.  So no aptitude log
files for the upgrade.  It can be that, for some reason, I upgraded
bootlogd only after the other sysvinit packages were upgraded.  dpkg
at the time of the upgrade was 1.16.10.  I think the packages were
upgraded from version 41 to 43.  In fact, I am not sure the missing
files were there when I upgraded from version 41 to 43.  I did try
to reinstall bootlogd, or perhaps bootlogd and initscripts, with
both dpkg 1.16.10 and 1.17.1.  It did not put the missing files back.
I had to purge and reinstall bootlogd in order to get the files
back.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716948#10
mentions some lines that include the word obsolete in 
/var/lib/dpkg/status.  I don't have that word. could it be due to
reinstalling, purging and installing, and all that process?  I did 
not purge initscripts.  Just bootlogd.




Merged 716948 717137 717234 717292 727074 Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. (Tue, 22 Oct 2013 02:42:18 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 12:38:48 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.