Package: debianutils
Version: 5.9
Severity: serious
Justification: fails to reinstall

Hi Bastian,

I appreciate that you want to help, but what you are doing to
debianutils causes work to other developers. You added code to support
installation of debianutils on unmerged systems. That configuration is
no longer supported in trixie and beyond. While you may support it, that
support comes at a significant cost to others and I question whether
that is a good trade-off. Please consider reverting it and cleaning up
the things it leaves behind. Also please test your build more
extensively before uploading. Thanks in advance.

What is broken precisely?

You already uploaded 5.10 and it fixes some things. Thanks. For
instances, Johannes reported that it broke DPKG_ROOT via #1050752, but
you ended up only fixing the postinst and the postrm still doesn't do
it. This is a normal bug.

Sven reported that on unmerged systems the symlinks would be wrong via
#1050725 and you also fixed it. Now they point at the right location,
but you still misspelled tempfile as tmpfile. (Thanks to Aurelien for
spotting this.)

That spelling mistake results in a fatal issue. Since /usr/bin/tmpfile
does not exist (neither on merged nor unmerged ones), you create a
symlink /bin/tmpfile -> /usr/bin/tmpfile. On an unmerged system, this is
a dead link. When running postinst again, /usr/bin/tmpfile still does
not exist, so it tries to link again and that makes postinst fail. On a
merged system /usr/bin/tmpfile now resolves to /bin/tmpfile, which
resolves to /usr/bin/tmpfile, because /bin is a symlink pointing to
/usr/bin. This is a loop and the existence test likewise returns
false-ish leading to the same postinst failure. If you were doing a
no-change upload of debianutils now, it would break on the upgrade. You
can already experience this by reinstalling the package:

mmdebstrap unstable /dev/null --chrooted-customize-hook="apt-get install -y 
--reinstall debianutils"
...
Unpacking debianutils (5.10) over (5.10) ...
Setting up debianutils (5.10) ...
ln: failed to create symbolic link '/usr/bin/tmpfile': File exists
dpkg: error processing package debianutils (--configure):
 installed debianutils package post-installation script subprocess returned 
error exit status 1
Errors were encountered while processing:
 debianutils
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is really bad.

On unmerged systems that happen to have debianutils 5.9 installed,
/usr/bin/tmpfile and /usr/bin/run-parts now point to /bin/which, which
does exist. The 5.10 postinst will not rectify this. Please also handle
that case.

As you fix all of these issues, please thoroughly test your update. In
particular, test upgrades from 5.8-1, 5.9 and 5.10. If you want to keep
supporting unmerged system (something I recommend not to do), repeat all
of those tests with unmerged chroots. piuparts can assist somewhat here.

I strongly recommend that you get your changes peer-reviewed before
uploading. It is just so easy to get wrong. A peer review is not an
admission of stupidity or otherwise negative. When I changed debootstrap
or debhelper in non-trivial ways recently, I also ensured to have
thorough peer reviews. I volunteer to review your changes. Let me know
if you want me to do it.

Helmut

Reply via email to