Package: debianutils Version: 5.17 Tags: patch X-Debbugs-Cc: jo...@debian.org User: helm...@debian.org Usertags: dep17
Hi, a longer while ago I added update-shells to debianutils as a way of managing /etc/shells using dpkg triggers. It took us a while to get the interactions with /usr-merge right and it seems we're not done yet. My recent bash upload changes it's shells.d snippet to include both aliased and canonical shells, which is right in principle, but it causes update-shells to duplicate /usr/bin/bash in /etc/shells. While that's not breaking anything yet, it's also not nice and kudos to Johannes for spotting it. It also is easy to fix with the attached patch. Would you kindly apply it? Helmut
diff --minimal -Nru debianutils-5.17/debian/changelog debianutils-5.17+nmu1/debian/changelog --- debianutils-5.17/debian/changelog 2024-03-01 20:08:45.000000000 +0100 +++ debianutils-5.17+nmu1/debian/changelog 2024-06-07 09:50:16.000000000 +0200 @@ -1,3 +1,11 @@ +debianutils (5.17+nmu1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * update-shells: Avoid duplicate lines when package shells contain both + aliased and canonical shells. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Fri, 07 Jun 2024 09:50:16 +0200 + debianutils (5.17) unstable; urgency=medium [ Patrick BrĂ¼nn ] diff --minimal -Nru debianutils-5.17/update-shells debianutils-5.17+nmu1/update-shells --- debianutils-5.17/update-shells 2024-02-28 21:00:25.000000000 +0100 +++ debianutils-5.17+nmu1/update-shells 2024-06-07 09:48:53.000000000 +0200 @@ -79,10 +79,12 @@ test -f "$f" || continue while IFS='#' read -r line _; do [ -n "$line" ] || continue - PKG_SHELLS="$PKG_SHELLS$line#" + if ! hashset_contains "$PKG_SHELLS" "$line"; then + PKG_SHELLS="$PKG_SHELLS$line#" + fi realshell=$(dpkg-realpath --root "$ROOT" "$(dirname "$line")")/$(basename "$line") - if [ "$line" != "$realshell" ]; then - PKG_SHELLS="$PKG_SHELLS$realshell#" + if ! hashset_contains "$PKG_SHELLS" "$realshell"; then + PKG_SHELLS="$PKG_SHELLS$realshell#" fi done < "$f" done