Package: debian-policy Version: 4.6.2.0 Severity: minor Tags: patch X-Debbugs-Cc: max-jul...@pogner.at
Dear Maintainer, consulting the debian policy manual whether it contains suggestions how to best implement diversions (see `man dpkg-divert`), i noticed syntax errors in the provided shell script example snippets. a patch fixing these typos is attached. -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: arm64, i386 Kernel: Linux 6.1.0-3-amd64 (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled debian-policy depends on no packages. Versions of packages debian-policy recommends: ii libjs-sphinxdoc 5.3.0-3 Versions of packages debian-policy suggests: pn doc-base <none>
>From d9769130d9da00933a19237d5b614dda5331e3e9 Mon Sep 17 00:00:00 2001 From: Max-Julian Pogner <max-jul...@pogner.at> Date: Thu, 16 Feb 2023 16:44:23 +0100 Subject: [PATCH] FIX: missing quotes in sh script example in file policy/ap-pkg-diversions --- policy/ap-pkg-diversions.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/policy/ap-pkg-diversions.rst b/policy/ap-pkg-diversions.rst index fe360d1..4b8c647 100644 --- a/policy/ap-pkg-diversions.rst +++ b/policy/ap-pkg-diversions.rst @@ -37,7 +37,7 @@ upgraded: :: - if [ upgrade != "$1 ] || dpkg --compare-versions "$2" lt 1.0-2; then + if [ upgrade != "$1" ] || dpkg --compare-versions "$2" lt 1.0-2; then dpkg-divert --package smailwrapper --add --rename \ --divert /usr/sbin/smail.real /usr/sbin/smail fi @@ -50,7 +50,7 @@ The postrm has to do the reverse: :: - if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1 ]; then + if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1" ]; then dpkg-divert --package smailwrapper --remove --rename \ --divert /usr/sbin/smail.real /usr/sbin/smail fi @@ -62,7 +62,7 @@ supported): :: - if [ abort-upgrade = "$1 ] && dpkg --compare-versions "$2" lt 1.0-2; then + if [ abort-upgrade = "$1" ] && dpkg --compare-versions "$2" lt 1.0-2; then dpkg-divert --package smailwrapper --remove --rename \ --divert /usr/sbin/smail.real /usr/sbin/smail fi -- 2.39.1