#1151270 dpkg: an error message mentions the old maintainer script instead of the new one

Package:
dpkg
Source:
dpkg
Description:
Debian package management system
Submitter:
Vincent Lefevre
Date:
2026-10-19 13:41:01 UTC
Severity:
normal
#1151270#5
Date:
2026-10-19 10:24:33 UTC
From:
To:
Upgrading tin fails:

[...]
Preparing to unpack .../tin_1%3a2.6.7~20260927-1_amd64.deb ...
Unpacking tin (1:2.6.7~20260927-1) over (1:2.6.6-1) ...
Setting up tin (1:2.6.7~20260927-1) ...
Installing new version of config file /etc/tin/tin.defaults ...
dpkg: error processing package tin (--configure):
 old tin package postinst maintainer script subprocess failed with exit status 1
[...]
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up tin (1:2.6.7~20260927-1) ...
dpkg: error processing package tin (--configure):
 old tin package postinst maintainer script subprocess failed with exit status 1
Errors were encountered while processing:
 tin

#1151270#10
Date:
2026-10-19 10:55:55 UTC
From:
To:
BTW, why "old"?

Even if I uninstall the tin package and install tin/1:2.6.7~20260927-1
again, I get the same error.

"apt install -f" also fails with the same error.

#1151270#15
Date:
2026-10-19 11:29:47 UTC
From:
To:
root@disset:~# DEBCONF_DEBUG=developer dpkg --configure tin
Setting up tin (1:2.6.7~20260927-1) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is tin
debconf (developer): starting /var/lib/dpkg/info/tin.config configure 1:2.6.6-1
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- BEGINBLOCK
debconf (developer): --> 0
debconf (developer): <-- SET shared/news/server news.lip.ens-lyon.fr
debconf (developer): --> 0 value set
debconf (developer): <-- INPUT medium shared/news/server
debconf (developer): --> 30 question skipped
debconf (developer): <-- ENDBLOCK
debconf (developer): --> 0
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): starting /var/lib/dpkg/info/tin.postinst configure 1:2.6.6-1
debconf (developer): <-- GET shared/news/server
debconf (developer): --> 0 news.lip.ens-lyon.fr
dpkg: error processing package tin (--configure):
 old tin package postinst maintainer script subprocess failed with exit status 1

In tin.postinst:

  local current_name="$(cat /etc/news/server)"
  [ "$RET" != "$current_name" ] || return

which should give

  [ "news.lip.ens-lyon.fr" != "news.lip.ens-lyon.fr" ] || return

but

$ f() { [ "news.lip.ens-lyon.fr" != "news.lip.ens-lyon.fr" ] || return; }
$ f
$ echo $?
1

while

$ f() { [ "news.lip.ens-lyon.fr" != "news.lip.ens-lyon.fr" ] || return 0; }
$ f
$ echo $?
0

https://chat.mistral.ai/work/c088fabe-6e87-4cd0-83f3-e8a95fcd9f8d
confirms that this is the cause of the failure.

Note also that

  [ "$RET" ] || return

has the same issue.

#1151270#22
Date:
2026-10-19 11:37:37 UTC
From:
To:
Control: clone -1 -2
Control: retitle -2 dpkg: an error message mentions the old maintainer script instead of the new one
Control: reassign -2 dpkg
me ignore the CI failure. :-(

How to reproduce: update a package to a new version with a failing
maintainer script.

#1151270#35
Date:
2026-10-19 13:40:01 UTC
From:
To:
Control: severity -1 important

This seems to be a regression in dpkg 1.23.0 (so Debian trixie is not
affected) from commit 02c3c45c6d025004c2f0cbf37260eb828ed2a357. I'll
queue a fix for the next release, which should happen this week.

Thanks,
Guillem