Bug#1031403: debian-policy: missing quotes in sh script example in file policy/ap-pkg-diversions

2023-09-10 Thread Edward Little
Please remove the following email address:  e.little...@gmail.com

On Sat, Sep 9, 2023 at 6:33 PM Russ Allbery  wrote:

> Control: tags -1 pending
>
> Max-Julian Pogner  writes:
>
> > 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.
>
> Thanks, applied for the next Policy release.
>
> --
> Russ Allbery (r...@debian.org)  
>
>


Processed: Re: Bug#1031403: debian-policy: missing quotes in sh script example in file policy/ap-pkg-diversions

2023-09-09 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 pending
Bug #1031403 [debian-policy] debian-policy: missing quotes in sh script example 
in file policy/ap-pkg-diversions
Added tag(s) pending.

-- 
1031403: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031403
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#1031403: debian-policy: missing quotes in sh script example in file policy/ap-pkg-diversions

2023-09-09 Thread Russ Allbery
Control: tags -1 pending

Max-Julian Pogner  writes:

> 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.

Thanks, applied for the next Policy release.

-- 
Russ Allbery (r...@debian.org)  



Bug#1031403: debian-policy: missing quotes in sh script example in file policy/ap-pkg-diversions

2023-02-16 Thread Max-Julian Pogner
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  
>From d9769130d9da00933a19237d5b614dda5331e3e9 Mon Sep 17 00:00:00 2001
From: Max-Julian Pogner 
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