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

[installation-guide] Corrrect filename format for the website?



Hi all,

while working on the lessoften cron script for building the installation-guide
for the website, I noticed that we have files named "<filename>.<lang>.html"
for the HTML variants, which is correct, but "<filename>.pdf.<lang>" and 
"<filename>.txt.<lang>" for the PDF and TXT variants.
This leads to broken filename extensions, when people are downloading that
files (a PDF file has the suffix "de" or "en" at the end for example).

While under Linux OSes this might work, because files are not identified via
the suffix but via their content, this leads to problems when people are
using a Windows system to read the manual for example.
Moreover it's inconsistent between HTML and PDF/TXT files.

Does anyone know a reason, why this should not be changed?
It's like this from the very first commit in the git repo, back in 2005,
so there is no changelog available in the repo, which tells about 
reasons why it's like this.


If noone objects, I would like to apply the attached patch, to correct this.

Holger


-- 
Holger Wansing <hwansing@mailbox.org>
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076
diff --git a/build/Makefile b/build/Makefile
index 61413df52..dbb406c6a 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -35,7 +35,7 @@ $(TARGETS): %:
 		else \
 			# Do not fail because of missing PDF support for some languages \
 			if [ -n "$$web" ] ; then \
-				mv ./$$destdir/install.$$lang.$$format "$$arch_destination/$$destsuffix/install.$$format.$$lang_id" 2>/dev/null || true ; \
+				mv ./$$destdir/install.$$lang.$$format "$$arch_destination/$$destsuffix/install.$$lang_id.$$format" 2>/dev/null || true ; \
 			else \
 				mv ./$$destdir/install.$$lang.$$format "$$arch_destination/$$destsuffix" 2>/dev/null || true ; \
 			fi ; \
diff --git a/debian/changelog b/debian/changelog
index c2e9552a0..cc0d26397 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ installation-guide (20200110) UNRELEASED; urgency=medium
   * Show a build version within the manual, parsed from debian/changelog.
   * Also add the '#_preseed_V1' header, when building the example-preseed.txt
     for the website, as it is already in the binary packages.
+  * Correct filename syntax for PDF and TXT formats, when building for the
+    website, to get valid filename suffixes.
 
  -- Holger Wansing <hwansing@mailbox.org>  Fri, 10 Jan 2020 23:21:11 +0100
 

Reply to: