Bug#1038067: dash: fails to upgrade from -2 in debian:sid-slim image due to --path-exclude=/usr/share/man

2023-06-17 Thread Andrej Shadura
Hi,

On Sat, 17 Jun 2023, at 11:38, Luca Boccassi wrote:
> Andrej I see that you are out of office, would you like me to NMU this fix to 
> unblock the CI?

No thanks, I’ll upload it now. I’ll also add an autopkgtest for this later.

-- 
Cheers,
  Andrej


Bug#1038067: dash: fails to upgrade from -2 in debian:sid-slim image due to --path-exclude=/usr/share/man

2023-06-17 Thread Luca Boccassi
On Sat, 17 Jun 2023, 02:05 Luca Boccassi,  wrote:

> Control: tags -1 patch
>
> On Thu, 15 Jun 2023 14:26:11 +0200 Helmut Grohne 
> 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.
>

Andrej I see that you are out of office, would you like me to NMU this fix
to unblock the CI?

Kind regards,
Lube Boccassi

>


Bug#1038067: dash: fails to upgrade from -2 in debian:sid-slim image due to --path-exclude=/usr/share/man

2023-06-16 Thread Olaf Meeuwissen
I can confirm that it breaks one of my CI jobs.

When the file you're trying to divert does not exist, there is nothing
to be done, so, yes, that should be assumed as being okay.

FWIW, I haven't tested the patch.
--
Olaf Meeuwissen



Bug#1038067: dash: fails to upgrade from -2 in debian:sid-slim image due to --path-exclude=/usr/share/man

2023-06-16 Thread Luca Boccassi
Control: tags -1 patch

On Thu, 15 Jun 2023 14:26:11 +0200 Helmut Grohne 
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 
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


Bug#1038067: dash: fails to upgrade from -2 in debian:sid-slim image due to --path-exclude=/usr/share/man

2023-06-15 Thread Helmut Grohne
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?

Helmut