retitle 645849 dpkg should better manage the Conffiles field
thanks
On Wed, 19 Oct 2011, Anton Zinoviev wrote:
> On Wed, Oct 19, 2011 at 05:53:55AM +0200, Michael Biebl wrote:
> > Package: console-setup
> > Version: 1.73
> > Severity: important
> >
> > While doing a test-upgrade from squeeze to sid, the following conffiles
> > were not cleaned up during the upgrade and marked as obsolete in the
> > dpkg status file:
> >
> > Conffiles:
> > /etc/console-setup/remap.inc 775b76c6c04cd18f8c72563e413a36aa obsolete
> > /etc/console-setup/compose.VISCII.inc 0741db54ddb6268e476010a44f219f03
> > obsolete
> >
> > [...]
>
> The conffiles are not obsoleted, now they belong to another package -
> console-setup-linux. I am sure this is not the first time conffiles have
> been transferred from one Debian package to another, but I don't know
> what is the proper way to handle this. I suppose this bug belongs to
> dpkg, should I reassign?
Well, dpkg certainly handles conffiles moving from one package to the
other if you use the proper "Replaces" field like for any other file.
Michael, what does your system say for "dpkg -S
/etc/console-setup/remap.inc" ?
I think it will give the new package. And the file will only appear in
dpkg -L of the new package too. However it's true that the "Conffiles"
field is not always properly updated. The conffile often ends up being
listed on both packages.
I instrumented the "t-conffile-replaces" test case like this:
--- a/t-conffile-replaces/Makefile
+++ b/t-conffile-replaces/Makefile
@@ -9,6 +9,9 @@ define VERIFY
test "`$(PKG_STATUS) pkg-conff-original`" = "install ok installed"
test "`$(PKG_STATUS) pkg-conff-takeover`" = "install ok installed"
test "`$(DPKG_QUERY) -S /test-conffile`" = "pkg-conff-takeover: /test-conffile"
+$(DPKG_QUERY) -W -f'$${Conffiles}\n' pkg-conff-original
+echo "Takeover:"
+$(DPKG_QUERY) -W -f'$${Conffiles}\n' pkg-conff-takeover
cmp ref-conffile /test-conffile
endef
It gives various results depending on how dpkg is called:
test-two-run-ordered & test-two-run-reverse:
/test-conffile e8a2f071ccdf836fc77865fba3ee8558
Takeover:
/test-conffile 45a18cfae67be6e80a5ec2ee60579bf3
test-one-run-ordered:
/test-conffile 45a18cfae67be6e80a5ec2ee60579bf3
Takeover:
/test-conffile newconffile
test-one-run-reverse:
/test-conffile newconffile
Takeover:
/test-conffile 45a18cfae67be6e80a5ec2ee60579bf3
There's room for improvements here.
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/go/ulule-rh/
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]