Control: tags -1 patch On Thu, 15 Jun 2023 14:26:11 +0200 Helmut Grohne <hel...@subdivi.de> wrote: > Package: dash > Version: 0.5.12-4 > Severity: serious > > Hi, > > if you --path-exclude=/usr/share/man, dash fails to upgrade from -2. > Reproducer: > > mmdebstrap trixie /dev/null --dpkgopt='path-exclude=/usr/share/man/*' --chrooted-customize-hook='sed -i -e s/trixie/sid/ /etc/apt/sources.list; apt-get update; apt-get -y install dash' > > Unfortunately, this breaks upgrading docker images debian:sid-slim to > unstable at the moment and that breaks lots of CI jobs. > > I guess it is the readlink that silently fails on the non-existent > manual page link. Probably, when that link doesn't exist and it is > diverted by dash, we should assume that it is ok-ish: > > actualtarget=$(readlink "$dfile") || actualtarget=$ltarget > > What do you think?
Yeah I can confirm your suggestion works, attached in patch format with attribution. -- Kind regards, Luca Boccassi
From 26bde9cff858faef4657d81be277381dc3c2816e Mon Sep 17 00:00:00 2001 From: Helmut Grohne <hel...@subdivi.de> Date: Sat, 17 Jun 2023 02:02:59 +0100 Subject: [PATCH] dash.postinst: fix installing with --path-exclude=/usr/share/man/* The symlink might not exist, but we should remove the diversion anyway. Closes: #1038067 --- debian/dash.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/dash.postinst b/debian/dash.postinst index 42b2fc9..7a1807f 100644 --- a/debian/dash.postinst +++ b/debian/dash.postinst @@ -64,7 +64,7 @@ drop_obsolete_diversion() { dfile=$1 ltarget=$2 distrib=${3:-$dfile.distrib} diverter=$(dpkg-divert --listpackage "$dfile") truename=$(dpkg-divert --truename "$dfile") - actualtarget=$(readlink "$dfile") + actualtarget=$(readlink "$dfile") || actualtarget=$ltarget if [ "$diverter" != dash ] || [ "$truename" != "$distrib" ] || [ "$actualtarget" != "$ltarget" ]; then # Not our diversion or a non-trivial one. -- 2.39.2
signature.asc
Description: This is a digitally signed message part