[Debian-tex-commits] SVN tex-common commit + diffs: r5375 - in tex-common/trunk: debian scripts
Norbert Preining
preining at alioth.debian.org
Tue Apr 10 23:52:26 UTC 2012
Author: preining
Date: 2012-04-10 23:52:26 +0000 (Tue, 10 Apr 2012)
New Revision: 5375
Modified:
tex-common/trunk/debian/changelog
tex-common/trunk/debian/postinst
tex-common/trunk/scripts/dh_installtex
tex-common/trunk/scripts/update-updmap
Log:
tex-common (3.7) unstable; urgency=low
* do not create /etc/texmf/language.d, and try to remove it in postinst
* update-updmap now includes snippets from /etc/texmf/updmap.d
which might be installed by Debian-external packages, but gives
big warnings
* dh_installtex: fix an error in the logic when to add a (magic)
header to the snippets, which resulted in all the updmap snippets
still containing the magic header (no harm done, though!)
Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog 2012-04-10 08:13:15 UTC (rev 5374)
+++ tex-common/trunk/debian/changelog 2012-04-10 23:52:26 UTC (rev 5375)
@@ -1,9 +1,14 @@
tex-common (3.7) unstable; urgency=low
- * UNRELEASED
- * do not create /etc/texmf/language.d
+ * do not create /etc/texmf/language.d, and try to remove it in postinst
+ * update-updmap now includes snippets from /etc/texmf/updmap.d
+ which might be installed by Debian-external packages, but gives
+ big warnings
+ * dh_installtex: fix an error in the logic when to add a (magic)
+ header to the snippets, which resulted in all the updmap snippets
+ still containing the magic header (no harm done, though!)
- -- Norbert Preining <preining at debian.org> Mon, 09 Apr 2012 23:20:05 +0900
+ -- Norbert Preining <preining at debian.org> Wed, 11 Apr 2012 08:46:18 +0900
tex-common (3.6) unstable; urgency=low
Modified: tex-common/trunk/debian/postinst
===================================================================
--- tex-common/trunk/debian/postinst 2012-04-10 08:13:15 UTC (rev 5374)
+++ tex-common/trunk/debian/postinst 2012-04-10 23:52:26 UTC (rev 5375)
@@ -531,6 +531,9 @@
fi
fi
+ # remove out dated dir /etc/texmf/language.d
+ rmdir --ignore-fail-on-non-empty /etc/texmf/language.d/
+
;;
*)
;;
Modified: tex-common/trunk/scripts/dh_installtex
===================================================================
--- tex-common/trunk/scripts/dh_installtex 2012-04-10 08:13:15 UTC (rev 5374)
+++ tex-common/trunk/scripts/dh_installtex 2012-04-10 23:52:26 UTC (rev 5375)
@@ -551,12 +551,14 @@
open(CFGFILE, ">$dofilen") ||
error("Cannot open $dofilen for writing!");
verbose_print("Writing $dofilen");
- if (($pkgprovidedfile && ($type ne "map") &&
- !magic_comment_present($pkgfilename)) ||
- (!$pkgprovidedfile && ($#cmdlinearguments >= 0))) {
- print CFGFILE "$commentchar{$type} $basefile\n";
- foreach (@magicheader) {
- print CFGFILE "$commentchar{$type} $_\n";
+ if ($type ne "map") {
+ if (($pkgprovidedfile &&
+ !magic_comment_present($pkgfilename)) ||
+ (!$pkgprovidedfile && ($#cmdlinearguments >= 0))) {
+ print CFGFILE "$commentchar{$type} $basefile\n";
+ foreach (@magicheader) {
+ print CFGFILE "$commentchar{$type} $_\n";
+ }
}
}
foreach (@{$pkgprovidedfilecontents{$type}}) {
Modified: tex-common/trunk/scripts/update-updmap
===================================================================
--- tex-common/trunk/scripts/update-updmap 2012-04-10 08:13:15 UTC (rev 5374)
+++ tex-common/trunk/scripts/update-updmap 2012-04-10 23:52:26 UTC (rev 5375)
@@ -67,6 +67,73 @@
done
}
+
+####################################################
+#
+# STUFF THAT IS ONLY HERE TO KEEP COMPATIBILITY WITH
+# PACKAGES OUTSIDE DEBIAN THAT SHIP OLD updmap.d
+# FILES AND WE CANNOT BREAK AGAINST THEM
+#
+####################################################
+
+# include_file <file path>
+include_file()
+{
+ file="$1"
+ printf "\n# ## From file: $file\n"
+ cat "$file"
+ echo "# End of file: $file"
+}
+
+# do_not_include_file <file path>
+do_not_include_file()
+{
+ file="$1"
+
+ cat <<EOF
+
+#
+# $file not included because either it wasn't
+# up-to-date (conffile update pending) or the package shipping it was
+# apparently removed (no corresponding .list file in
+# $SNIPPET_BASE/).
+#
+EOF
+}
+
+handle_file()
+{
+ file="$1"
+ DebPkgProvidedMaps_magic_comment="^[#%] -_- DebPkgProvidedMaps -_-"
+ # Does the file have a dpkg-new sister?
+ if [ -f "${file}.dpkg-new" ]; then
+ do_not_include_file "$file"
+ else
+ # Does the file have the magic comment?
+ if grep -E "$DebPkgProvidedMaps_magic_comment" "$file" >/dev/null; then
+ # Is the package "$file" comes from still installed?
+ if [ -d "$SNIPPET_BASE" ] \
+ && find "$SNIPPET_BASE" -type f -name '*.list' -print0 \
+ | xargs -0r cat \
+ | grep -E "^$(basename "$file" .cfg)\$" >/dev/null;
+ then
+ include_file "$file"
+ else
+ do_not_include_file "$file"
+ fi
+ else
+ include_file "$file"
+ fi
+ fi
+}
+
+#######################################################
+#
+# end of backward compatibility stuff
+#
+#######################################################
+
+
# The list of signals to trap is taken from teTeX 3's updmap script, but they
# have been converted to signal names because we can only rely on these on
# POSIX systems.
@@ -153,10 +220,11 @@
fi
fi
- # Creating the temporary file in the output directory gives it automatically
- # the default permissions appropriate for that directory, according to the
- # user's umask. When it is complete, we'll be able to rename it atomically to
- # the desired output file, which will therefore have the right permissions.
+ # Creating the temporary file in the output directory gives it
+ # automatically the default permissions appropriate for that
+ # directory, according to the user's umask. When it is complete,
+ # we'll be able to rename it atomically to the desired output
+ # file, which will therefore have the right permissions.
tempfile="updmap.$tree.new"
if ! printf "" > "$tempfile" ; then
@@ -178,6 +246,33 @@
find "$SNIPPET_BASE/$tree" -maxdepth 1 -type f -name '*.cfg' \
-exec cat '{}' \; >> "$tempfile"
+ if [ $tree = "texmf" ] ; then
+ #
+ # also include snippets in /etc/texmf/updmap.d but give
+ # big fat warnings that this might create problems!!!
+ if [ -d $SNIPPET_OLD_BASE ] ; then
+ old_files=$(find $SNIPPET_OLD_BASE -maxdepth 1 -type f -name '*.cfg' | LC_COLLATE=C sort)
+ if [ -n "$old_files" ] ; then
+ cat >&2 <<EOF
+
+
+Warning: Old configuration style found in $SNIPPET_OLD_BASE
+Warning: For now these files have been included,
+Warning: but expect inconsistencies.
+Warning: These packages should be rebuild with tex-common.
+EOF
+ for file in $old_files ; do
+ echo "Warning: found file: $file" >&2
+ done
+ echo "" >&2
+ fi
+
+ for file in $old_files ; do
+ handle_file $file >> "$tempfile"
+ done
+ fi
+ fi
+
# This is atomic.
mv "$tempfile" "$output_file"
updated_files="$updated_files\t$output_file\n";
@@ -193,18 +288,6 @@
done
-#
-# check for old files
-if [ -d $SNIPPET_OLD_BASE ] ; then
- old_files=$(find $SNIPPET_OLD_BASE -name \*.cfg)
- if [ -n "$old_files" ] ; 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
- echo ""
- fi
-fi
-
if [ $quiet = 0 ] && [ -n "$updated_files" ] ; then
echo "$progname has updated the following file(s):"
printf "$updated_files\n"
More information about the Debian-tex-commits
mailing list