[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#175064: DocBook XML conversion is read with this script



On Mon, 2017-01-16 at 00:53:43 +0100, gregor herrmann wrote:
> On Sun, 15 Jan 2017 20:51:07 +0100, Guillem Jover wrote:
> 
> > Subject: [PATCH 1/7] Use entities instead of literal <, > and &
> 
> It seems you've converted some '>' to '&gt;' but not all?

Indeed, nice catch! The following two I think were part of a botched
patch split during a rebase. But there are several other I had missed
and for which the tools I've used did not complain. In any case, I've
now switching all of them, I think. Updated patch attached.

> > -if [ "$1" = start ] && which initctl >/dev/null && initctl version | grep -q upstart
> > +if [ "$1" = start ] &amp;&amp; which initctl >/dev/null &amp;&amp; initctl version | grep -q upstart
>                                                 ^
> 
> > -  if dpkg-statoverride --list $i >/dev/null 2>&1
> > +  if dpkg-statoverride --list $i >/dev/null 2&gt;&amp;1

Thanks,
Guillem
From 1586352346d4a007814ce1208f639711a977130a Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Tue, 10 Jan 2017 00:31:37 +0100
Subject: [PATCH v2 1/7] Use entities instead of literal <, > and &

This is required in DocBook, otherwise it makes XML toolchains trip over.
---
 policy.sgml | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/policy.sgml b/policy.sgml
index b0b2e09..02d74b8 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -4274,7 +4274,7 @@ Checksums-Sha256:
 	        facility the <prgn>postrm</prgn> intends to call is
 	        available before calling it.  For example:
 <example>
-if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+if [ "$1" = purge ] &amp;&amp; [ -e /usr/share/debconf/confmodule ]; then
         . /usr/share/debconf/confmodule
         db_purge
 fi
@@ -4836,7 +4836,7 @@ fi
 	  <example compact="compact">
 Package: mutt
 Version: 1.3.17-1
-Depends: libc6 (>= 2.2.1), exim | mail-transport-agent
+Depends: libc6 (&gt;= 2.2.1), exim | mail-transport-agent
 	  </example>
 	</p>
 
@@ -6558,7 +6558,7 @@ Built-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)
 	      <var>main-dependency-template</var> has the same syntax as a
 	      dependency field in a binary package control file, except
 	      that the string <tt>#MINVER#</tt> is replaced by a version
-	      restriction like <tt>(>= <var>version</var>)</tt> or by
+	      restriction like <tt>(&gt;= <var>version</var>)</tt> or by
 	      nothing if an unversioned dependency is deemed sufficient.
 	      The version restriction will be based on which symbols from
 	      the shared library are referenced and the version at which
@@ -6614,9 +6614,9 @@ Built-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)
 		compressBound@ZLIB_1.2.0 1:1.2.0
 	      </example>
 	      Packages using only <tt>compress</tt> would then get a
-	      dependency on <tt>zlib1g (>= 1:1.1.4)</tt>, but packages
+	      dependency on <tt>zlib1g (&gt;= 1:1.1.4)</tt>, but packages
 	      using <tt>compressBound</tt> would get a dependency
-	      on <tt>zlib1g (>= 1:1.2.0)</tt>.
+	      on <tt>zlib1g (&gt;= 1:1.2.0)</tt>.
 	    </p>
 
 	    <p>
@@ -6648,7 +6648,7 @@ Built-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)
 		on <tt>libgl1</tt> (which may be provided by multiple
 		packages), but ones
 		using <tt>implementationSpecificSymbol</tt> would get a
-		dependency on <tt>libgl1-mesa-glx (>= 6.5.2-7)</tt>
+		dependency on <tt>libgl1-mesa-glx (&gt;= 6.5.2-7)</tt>
 	      </footnote>
 	    </p>
 
@@ -6897,7 +6897,7 @@ Built-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)
 	      library was in version <tt>1:1.2.3.3.dfsg-1</tt>, then
 	      the <tt>shlibs</tt> entry for this library could say:
 	      <example compact="compact">
-		libz 1 zlib1g (>= 1:1.2.3.3.dfsg)
+		libz 1 zlib1g (&gt;= 1:1.2.3.3.dfsg)
 	      </example>
 	      This version restriction must be new enough that any binary
 	      built against the current version of the library will work
@@ -6909,7 +6909,7 @@ Built-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)
 	      As zlib1g also provides a udeb containing the shared
 	      library, there would also be a second line:
 	      <example compact="compact">
-		udeb: libz 1 zlib1g-udeb (>= 1:1.2.3.3.dfsg)
+		udeb: libz 1 zlib1g-udeb (&gt;= 1:1.2.3.3.dfsg)
 	      </example>
 	    </p>
 	  </sect2>
@@ -7087,7 +7087,7 @@ Built-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)
 		<p>
 		  Packages must not assume the <file>/run</file>
 		  directory exists or is usable without a dependency
-		  on <tt>initscripts (>= 2.88dsf-13.3)</tt> until the
+		  on <tt>initscripts (&gt;= 2.88dsf-13.3)</tt> until the
 		  stable release of Debian supports <file>/run</file>.
 		</p>
 	      </item>
@@ -7196,7 +7196,7 @@ Built-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)
 	    contain something like
 	    <example compact="compact">
 if [ ! -e /usr/local/share/emacs ]; then
-  if mkdir /usr/local/share/emacs 2>/dev/null; then
+  if mkdir /usr/local/share/emacs 2&gt;/dev/null; then
     if chown root:staff /usr/local/share/emacs; then
       chmod 2775 /usr/local/share/emacs || true
     fi
@@ -7205,8 +7205,8 @@ fi
 	    </example>
 	    in its <prgn>postinst</prgn> script, and
 	    <example compact="compact">
-rmdir /usr/local/share/emacs/site-lisp 2>/dev/null || true
-rmdir /usr/local/share/emacs 2>/dev/null || true
+rmdir /usr/local/share/emacs/site-lisp 2&gt;/dev/null || true
+rmdir /usr/local/share/emacs 2&gt;/dev/null || true
 	    </example>
 	    in the <prgn>prerm</prgn> script.  (Note that this form is
 	    used to ensure that if the script is interrupted, the
@@ -8593,7 +8593,7 @@ exec /usr/lib/foo/foo "$@"
             <tt>upstart</tt> and avoid running in favor of the native
             upstart job, using a test such as this:
 	    <example compact="compact">
-if [ "$1" = start ] && which initctl >/dev/null && initctl version | grep -q upstart
+if [ "$1" = start ] &amp;&amp; which initctl &gt;/dev/null &amp;&amp; initctl version | grep -q upstart
 then
 	exit 1
 fi
@@ -9712,7 +9712,7 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq
 for i in /usr/bin/foo /usr/sbin/bar
 do
   # only do something when no setting exists
-  if ! dpkg-statoverride --list $i >/dev/null 2>&1
+  if ! dpkg-statoverride --list $i &gt;/dev/null 2&gt;&amp;1
   then
     #include: debconf processing, question about foo and bar
     if [ "$RET" = "true" ] ; then
@@ -9726,7 +9726,7 @@ done
 	    <example>
 for i in /usr/bin/foo /usr/sbin/bar
 do
-  if dpkg-statoverride --list $i >/dev/null 2>&1
+  if dpkg-statoverride --list $i &gt;/dev/null 2&gt;&amp;1
   then
     dpkg-statoverride --remove $i
   fi
@@ -12341,7 +12341,7 @@ END-INFO-DIR-ENTRY
 	older version (unless the older version is so old that direct
 	upgrades are no longer supported):
 	<example>
-  if [ abort-upgrade = "$1" ] && dpkg --compare-versions "$2" lt 1.0-2; then
+  if [ abort-upgrade = "$1" ] &amp;&amp; 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.11.0


Reply to: