[Debian-tex-commits] SVN tex-common commit + diffs: r5111 - in tex-common/branches/v3: debian scripts

Norbert Preining preining at alioth.debian.org
Fri Mar 2 00:26:23 UTC 2012


Author: preining
Date: 2012-03-02 00:26:22 +0000 (Fri, 02 Mar 2012)
New Revision: 5111

Modified:
   tex-common/branches/v3/debian/changelog
   tex-common/branches/v3/scripts/update-updmap
Log:
update-updmap: read old snippets for backward compatibility


Modified: tex-common/branches/v3/debian/changelog
===================================================================
--- tex-common/branches/v3/debian/changelog	2012-03-01 05:07:44 UTC (rev 5110)
+++ tex-common/branches/v3/debian/changelog	2012-03-02 00:26:22 UTC (rev 5111)
@@ -1,3 +1,10 @@
+tex-common (3.0-1~5) unstable; urgency=low
+
+  * add backward compatibility to update-updmap, so that it reads
+    snippets from /etc/texmf/updmap.d, but NOT 99local.cfg
+
+ -- Norbert Preining <preining at debian.org>  Fri, 02 Mar 2012 09:11:58 +0900
+
 tex-common (3.0-1~4) unstable; urgency=low
 
   * properly treat KanjiMap entries in dh_installtex

Modified: tex-common/branches/v3/scripts/update-updmap
===================================================================
--- tex-common/branches/v3/scripts/update-updmap	2012-03-01 05:07:44 UTC (rev 5110)
+++ tex-common/branches/v3/scripts/update-updmap	2012-03-02 00:26:22 UTC (rev 5111)
@@ -21,6 +21,8 @@
 progname=$(basename "$0")
 
 SNIPPET_BASE=/var/lib/tex-common/fontmap-cfg
+SNIPPET_OLD_BASE=/etc/texmf/updmap.d
+
 # this needs to be kept in sync with dh_installtex
 COMPONENTS="texmf texlive"
 
@@ -120,13 +122,20 @@
 # *                               Actual work                                *
 # ****************************************************************************
 
+updated_files=""
 for tree in $COMPONENTS ; do
-    if [ ! -d "$SNIPPET_BASE/$tree" ] ; then
+    if [ $tree = "texlive" ] && [ ! -d "$SNIPPET_BASE/$tree" ] ; then
         if [ $quiet = 0 ]; then
             printf "$progname: skipping $tree\n";
         fi
         continue;
     fi
+    if [ $tree = "texmf" ] && [ ! -d "$SNIPPET_BASE/$tree" ] && [ ! -d "$SNIPPET_OLD_BASE" ] ; then
+        if [ $quiet = 0 ]; then
+            printf "$progname: skipping $tree\n";
+        fi
+        continue;
+    fi
     if [ $tree = "texmf" ] ; then
         # output_file=/usr/share/texmf/web2c/updmap.cfg
         output_file=/var/lib/texmf/updmap.cfg-DEBIAN
@@ -172,25 +181,44 @@
     # From now on, $tempfile must be deleted on exit; therefore, cleanup() should
     # be used.
 
-    find "$SNIPPET_BASE/$tree"  -maxdepth 1 -type f -name '*.cfg' \
-        -exec cat '{}' \; >> "$tempfile"
+    if [ -d "$SNIPPET_BASE/$tree" ] ; then
+        find "$SNIPPET_BASE/$tree"  -maxdepth 1 -type f -name '*.cfg' \
+            -exec cat '{}' \; >> "$tempfile"
+    fi
 
+    # backward compatibility with old snippets in /etc/texmf/updmap.d
+    if [ $tree = "texmf" ] && [ -d $SNIPPET_OLD_BASE ] ; then
+        echo ""
+        echo "Warning: old configuration style found in $SNIPPET_OLD_BASE" >&2
+        echo "Warning: these packages should be rebuild with tex-common >= 3" >&2
+        if [ -r "$SNIPPET_OLD_BASE/99local.cfg" ] ; then
+            echo "Warning: local adaptions in $SNIPPET_OLD_BASE/99local.cfg should be moved to /etc/texmf/web2c/updmap.cfg (probably!)" >&2
+        fi
+        echo ""
+        find $SNIPPET_OLD_BASE -maxdepth 1 -type f -name '*.cfg' \
+            -and -not -name '*99local.cfg' -exec cat '{}' \; >> "$tempfile"
+    fi
     # This is atomic.
     mv "$tempfile" "$output_file"
+    updated_files="$updated_files\t$output_file\n";
 
     # Check wether the generated file is decent, if all necessary files are
     # installed, etc.
     if [ "$dochecks" = 1 ] ; then
         perform_contents_check "$output_file"
     fi
-
     if [ $quiet = 0 ]; then
         printf "done.\n\n"
-        echo "$progname has updated '$output_file'. If you want to";
-        echo "enable the map files with this new file, you should run" \
-             "updmap-sys or updmap."
     fi
+
 done
 
+if [ $quiet = 0 ] && [ -n "$updated_files" ] ; then
+    echo "$progname has updated the following file(s):"
+    printf "$updated_files\n"
+    echo "If you want to enable the map files with this new file,"
+    echo "you should run updmap-sys or updmap."
+fi
 
+
 # vim:set expandtab tabstop=4 autoindent: #




More information about the Debian-tex-commits mailing list