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

Bug#992889: /usr/sbin/update-gsfontmap: overly complicated



Package: ghostscript
Version: 9.27~dfsg-2+deb10u4
Severity: minor
File: /usr/sbin/update-gsfontmap
Tags: patch

Dear Maintainer,

The current approach that update-gsfontmap takes is very complicated,
to no apparent end, since all it achieves is concatenating all the files;
please consider the attached patch, which applies to every version since
7e78b19759ab1e47a3636ffd5c922c536e6cad37 (November of 2018)

Best,
наб

-- System Information:
Debian Release: 10.10
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-debug'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-17-amd64 (SMP w/24 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 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 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ghostscript depends on:
ii  libc6   2.28-10
ii  libgs9  9.27~dfsg-2+deb10u4

Versions of packages ghostscript recommends:
ii  gsfonts  1:8.11+urwcyr1.0.7~pre44-4.4

Versions of packages ghostscript suggests:
ii  ghostscript-x  9.27~dfsg-2+deb10u4

-- no debconf information
diff --git a/debian/update-gsfontmap.orig b/debian/update-gsfontmap
index 5367ff6..c105363 100644
--- a/debian/update-gsfontmap.orig
+++ b/debian/update-gsfontmap
@@ -8,15 +8,7 @@ FONTMAP=/var/lib/ghostscript/fonts/Fontmap
 CIDFDIR=/etc/ghostscript/cidfmap.d/
 FONTMDIR=/etc/ghostscript/fontmap.d/
 
-rm -f "$CIDFMAP" "$FONTMAP"
-touch "$CIDFMAP" "$FONTMAP"
-
-for i in "$CIDFDIR"/*.conf; do
-    cat "$i" >> "$CIDFMAP"
-done 2>/dev/null
-
-for i in "$FONTMDIR"/*.conf; do
-    cat "$i" >> "$FONTMAP"
-done 2>/dev/null
+cat "$CIDFDIR"/*.conf  > "$CIDFMAP" 2>/dev/null
+cat "$FONTMDIR"/*.conf > "$FONTMAP" 2>/dev/null
 
 exit 0

Attachment: signature.asc
Description: PGP signature


Reply to: