Package: debiandoc-sgml
Version: 1.2.27
Severity: normal
Tags: patch
Dear Maintainer,
*** Please consider answering these questions, where appropriate ***
* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?
*** End of the template - remove these lines ***
If the script finds an SGML input file without a localization infix,
it creates a symlink to it with '.en' as an infix, regardless of
whether one is present.
I have included a more cautious version of the code as a patch, with
all the quoting I usually use, which is more of a change than is
really required.
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages debiandoc-sgml depends on:
ii libhtml-parser-perl 3.69-2
ii libroman-perl 1.23-1
ii libtext-format-perl 0.56-1
ii perl 5.14.2-15
ii sgml-base 1.26+nmu3
ii sgml-data 2.0.8
ii sgmlspl 1.03ii-32
ii sp 1.3.4-1.2.1-47.1+b1
Versions of packages debiandoc-sgml recommends:
ii ghostscript 9.05~dfsg-6.2
ii texinfo 4.13a.dfsg.1-10
ii texlive 2012.20120611-5
ii texlive-latex-extra 2012.20120611-2
Versions of packages debiandoc-sgml suggests:
ii debiandoc-sgml-doc 1.1.22
pn latex-cjk-all <none>
pn texlive-lang-all <none>
-- no debconf information
>From 1cf42630e29770eff09499b84048fe2af5a32641 Mon Sep 17 00:00:00 2001
From: Felix Gatzemeier <[email protected]>
Date: Sat, 1 Dec 2012 12:38:02 +0100
Subject: [PATCH] Be more cautious about overwriting manuals.
---
debiandoc-bin/debiandoc2dbkpo | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/debiandoc-bin/debiandoc2dbkpo b/debiandoc-bin/debiandoc2dbkpo
index af7d76d..b4b81b3 100755
--- a/debiandoc-bin/debiandoc2dbkpo
+++ b/debiandoc-bin/debiandoc2dbkpo
@@ -49,13 +49,19 @@ shift
LANGS="$@"
#
-# If English dos not have .en. , then make symlink
-#
-if [ -r $MANUAL.sgml ]; then
- ln -sf $MANUAL.sgml $MANUAL.en.sgml
-elif [ ! -r $MANUAL.en.sgml ]; then
- echo "Neither $MANUAL.en.sgml nor $MANUAL.sgml found." >&2
- exit 1
+# If there is no ".en" source, but one without encoding, that that is
+# probably an English one and we make a symlink.
+#
+if [ ! -r "${MANUAL}.en.sgml" ] ; then
+ if [ -r "${MANUAL}.sgml" ]; then
+ echo "Warning: No '${MANUAL}.en.sgml' found, but a '${MANUAL}.sgml'."
+ echo " Creating a symlink."
+ echo " Beware: Your project may have mor complicated building instructions."
+ ln -sf "${MANUAL}.sgml" "${MANUAL}.en.sgml"
+ else
+ echo "Error: Neither '${MANUAL}.en.sgml' nor '${MANUAL}.sgml' found." >&2
+ exit 1
+ fi
fi
#
--
1.7.10.4