[Debian-tex-commits] SVN tex-common commit + diffs: r2487 - in tex-common/trunk: debian scripts

Frank Küster frank at alioth.debian.org
Mon Feb 19 18:55:05 CET 2007


Author: frank
Date: 2007-02-19 18:55:04 +0100 (Mon, 19 Feb 2007)
New Revision: 2487

Modified:
   tex-common/trunk/debian/changelog
   tex-common/trunk/debian/rules
   tex-common/trunk/scripts/dh_installtex
   tex-common/trunk/scripts/postinst-tex
   tex-common/trunk/scripts/postinst-texlsr
   tex-common/trunk/scripts/postrm-tex
   tex-common/trunk/scripts/postrm-texlsr
Log:
check in Norbert's enhancements to dh_installtex, see changelog


Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog	2007-02-19 17:47:52 UTC (rev 2486)
+++ tex-common/trunk/debian/changelog	2007-02-19 17:55:04 UTC (rev 2487)
@@ -2,8 +2,13 @@
 
   * Increase trie_size to the value in TeXLive 2007, and update the
     comment from their texmf.in file, too.
+  * Only strip comments with '^[ \t]*# ' from the auto files to preserve
+    comments starting with ## [NP]
+  * small fix to dh_installtex for useless inclusion of postinst-tex
+    (move the definition of $dothefullstuff into the package loop)
+  * implement flavors format:build_all and format:add_one:formatname
 
- -- Frank Küster <frank at debian.org>  Mon, 12 Feb 2007 19:05:54 +0100
+ -- Norbert Preining <preining at debian.org>  Sun, 18 Feb 2007 13:13:04 +0100
 
 tex-common (1.0) unstable; urgency=low
 

Modified: tex-common/trunk/debian/rules
===================================================================
--- tex-common/trunk/debian/rules	2007-02-19 17:47:52 UTC (rev 2486)
+++ tex-common/trunk/debian/rules	2007-02-19 17:55:04 UTC (rev 2487)
@@ -83,10 +83,10 @@
 
         # debhelper stuff
         # dh_installtex(.1) is already installed via the bin_scripts
-	grep -v '^[ \t]*#' scripts/postrm-tex > $(INSTDIR)/usr/share/debhelper/autoscripts/postrm-tex
-	grep -v '^[ \t]*#' scripts/postinst-tex > $(INSTDIR)/usr/share/debhelper/autoscripts/postinst-tex
-	grep -v '^[ \t]*#' scripts/postrm-texlsr > $(INSTDIR)/usr/share/debhelper/autoscripts/postrm-texlsr
-	grep -v '^[ \t]*#' scripts/postinst-texlsr > $(INSTDIR)/usr/share/debhelper/autoscripts/postinst-texlsr
+	grep -v '^[ \t]*# ' scripts/postrm-tex > $(INSTDIR)/usr/share/debhelper/autoscripts/postrm-tex
+	grep -v '^[ \t]*# ' scripts/postinst-tex > $(INSTDIR)/usr/share/debhelper/autoscripts/postinst-tex
+	grep -v '^[ \t]*# ' scripts/postrm-texlsr > $(INSTDIR)/usr/share/debhelper/autoscripts/postrm-texlsr
+	grep -v '^[ \t]*# ' scripts/postinst-texlsr > $(INSTDIR)/usr/share/debhelper/autoscripts/postinst-texlsr
 
         # fontcache stuff with proper permissions
 	install -d $(INSTDIR)/etc/texmf/web2c/

Modified: tex-common/trunk/scripts/dh_installtex
===================================================================
--- tex-common/trunk/scripts/dh_installtex	2007-02-19 17:47:52 UTC (rev 2486)
+++ tex-common/trunk/scripts/dh_installtex	2007-02-19 17:55:04 UTC (rev 2487)
@@ -15,7 +15,7 @@
 [S<I<debhelper options>>]
 [B<-n>]
 [B<--priority=>I<n>]
-[B<--flavor=>I<flavor>] 
+[B<--flavor=>I<flavor>[,I<flavor>]]
 [B<map=MixedMap,>I<file.map>]
 [B<map=Map,>I<file.map>]
 [B<mapfile=>I<file.cfg>[=I<n>]]
@@ -146,11 +146,14 @@
 
 Set the default priority to I<n> instead of 20.
 
-=item B<--flavor=>I<flavor>
+=item B<--flavor=>I<flavor>[,I<flavor>]
 
-This option will be used to switch additional options on. At the moment
-you can select for I<flavor> either B<map:config_for_active_maps> or
-B<map:config_for_all_maps>.
+This option will be used to switch additional options on. The argument
+specify a list from flavors to be selected.
+At the moment you can select from the following list of flavors:
+B<map:config_for_active_maps>, B<map:config_for_all_maps>,
+B<format:build_all>, and B<format:add_one:I<formatname>>.
+
 B<map:config_for_active_maps> will create a file I<config.bar> for each active
 (i.e. uncommented) map in each of the cfg file generated by one of the
 three methods described above. These files are installed in
@@ -165,6 +168,13 @@
 
 Default is I<not> to generate any config files.
 
+B<format:build_all> creates all defined formats in the postinst file,
+recreates all defined formats in the postrm file, and in addition cleans
+the generated files in the postrm files.
+
+B<format:add_one:I<formatname>> allows to add the generation of a specific
+format without actually providing it (in a cnf file).
+
 =head1 NOTES
 
 Note that this command is not idempotent. "dh_clean -k" should be called
@@ -187,8 +197,9 @@
 #
 my $flavor;		
 my $mapdoconfig =  0;	# doconfig depending map/subflavor
+my $doallformats = 0;	# depending on flavor format:build_all
+my @addbuildformats = (); # additional formats to be build
 my $priority=20;	# priority with which files are installed
-my $dothefullstuff = 0;
 my %cmdlineargs;
 my %cmdlinefiles;
 my %cmdlinefilespriority;
@@ -346,12 +357,18 @@
 #
 #
 if (defined($dh{FLAVOR})) {
-	if ($dh{FLAVOR} eq "map:config_for_active_maps") {
-		$mapdoconfig = 1;
-	} elsif ($dh{FLAVOR} eq "map:config_for_all_maps") {
-		$mapdoconfig = 2;
-	} else {
-		error("Specified flavor $dh{FLAVOR} not supported.\nPlease see man page for supported flavors!\n");
+	foreach my $fl (split (/,/,$dh{FLAVOR})) {
+		if ($fl eq "map:config_for_active_maps") {
+			$mapdoconfig = 1;
+		} elsif ($fl eq "map:config_for_all_maps") {
+			$mapdoconfig = 2;
+		} elsif ($fl eq "format:build_all") {
+			$doallformats = 1;
+		} elsif ($fl =~ /^format:add_one:(.*)$/) {
+			push @addbuildformats , $1;
+		} else {
+			error("Specified flavor $fl not supported.\nPlease see man page for supported flavors!\n");
+		}
 	}
 }
 
@@ -365,6 +382,7 @@
 	# as they vary with package
 	my $tmp=tmpdir($package);
 	my %pkgprovidedfilecontents;
+	my $dothefullstuff = 0;
 	my %data;
 	my @whattodo = ();
 
@@ -513,6 +531,23 @@
 	if (defined($data{"format"})) {
 		@fmtdata = @{$data{"format"}};
 	}
+	if ($#addbuildformats >= 0) {
+		push @fmtdata, @addbuildformats;
+	}
+	if ($doallformats == 1) {
+		# in case we have allformats to do we ignore
+		# 	language and format
+		my @newwhat = ();
+		push @newwhat, "allformats";
+		foreach my $t (@whattodo) {
+			if ($t eq "map") {
+				push @newwhat, $t;
+			}
+		}
+		@whattodo = @newwhat;
+		# also include the full code
+		$dothefullstuff = 1;
+	}
 	if (! $dh{NOSCRIPTS}) {
 		my %uniq;
 		foreach (@cmdlinetexmftrees, @defaulttexmftrees) { 

Modified: tex-common/trunk/scripts/postinst-tex
===================================================================
--- tex-common/trunk/scripts/postinst-tex	2007-02-19 17:47:52 UTC (rev 2486)
+++ tex-common/trunk/scripts/postinst-tex	2007-02-19 17:55:04 UTC (rev 2487)
@@ -1,18 +1,18 @@
-#
-# postinst-tex
-#
-# postinst snippets for registering hyphenation patterns, font maps, and formats
-#
-# Authors:
-#       Florent Rougon <f.rougon at free.fr>
-#       Norbert Preining <preining at logic.at>
-#
+##
+## postinst-tex
+##
+## postinst snippets for registering hyphenation patterns, font maps, 
+## and formats
+##
+## Authors:
+##       Florent Rougon <f.rougon at free.fr>
+##       Norbert Preining <preining at logic.at>
+##
 # Please note that comments in this file are stripped before installation
-# by calling a grep -v '^[ \t]*#'
+# by calling a grep -v '^[ \t]*# '
+# Thus, first lines containing ## are preserved!
 # So please be careful if you add stuff here!
 #
-# Let vim know that we don't want tabs
-# vim:set expandtab: #
 
 dhit_create_fontmaps ()
 {
@@ -86,6 +86,9 @@
                         dhit_create_fontmaps
                     fi
                 fi
+                if [ "$i" = allformats ] ; then
+                    dhit_build_format --all
+                fi
                 if [ "$i" = format ] ; then
                     for fmt in #FORMATS# ; do
                         dhit_build_format --byfmt $fmt
@@ -104,3 +107,6 @@
         exit 1
     ;;
 esac
+
+# Let vim know that we don't want tabs
+# vim:set expandtab: #

Modified: tex-common/trunk/scripts/postinst-texlsr
===================================================================
--- tex-common/trunk/scripts/postinst-texlsr	2007-02-19 17:47:52 UTC (rev 2486)
+++ tex-common/trunk/scripts/postinst-texlsr	2007-02-19 17:55:04 UTC (rev 2487)
@@ -1,14 +1,15 @@
-#
-# postinst-texlsr
-#
-# postinst snippets for calling maketexlsr, update-*
-#
-# Authors:
-#       Florent Rougon <f.rougon at free.fr>
-#       Norbert Preining <preining at logic.at>
-#
+##
+## postinst-texlsr
+##
+## postinst snippets for calling maketexlsr, update-*
+##
+## Authors:
+##       Florent Rougon <f.rougon at free.fr>
+##       Norbert Preining <preining at logic.at>
+##
 # Please note that comments in this file are stripped before installation
-# by calling a grep -v '^[ \t]*#'
+# by calling a grep -v '^[ \t]*# '
+# Thus, first lines containing ## are preserved!
 # So please be careful if you add stuff here!
 #
 # Let vim know that we don't want tabs

Modified: tex-common/trunk/scripts/postrm-tex
===================================================================
--- tex-common/trunk/scripts/postrm-tex	2007-02-19 17:47:52 UTC (rev 2486)
+++ tex-common/trunk/scripts/postrm-tex	2007-02-19 17:55:04 UTC (rev 2487)
@@ -1,18 +1,17 @@
-#
-# postrm-tex
-#
-# postrm snippets for registering hyphenation patterns, font maps, and formats
-#
-# Authors:
-#       Florent Rougon <f.rougon at free.fr>
-#       Norbert Preining <preining at logic.at>
-#
+##
+## postrm-tex
+##
+## postrm snippets for registering hyphenation patterns, font maps, and formats
+##
+## Authors:
+##       Florent Rougon <f.rougon at free.fr>
+##       Norbert Preining <preining at logic.at>
+##
 # Please note that comments in this file are stripped before installation
-# by calling a grep -v '^[ \t]*#'
+# by calling a grep -v '^[ \t]*# '
+# Thus, first lines containing ## are preserved!
 # So please be careful if you add stuff here!
 #
-# Let vim know that we don't want tabs
-# vim:set expandtab: #
 
 dhit_build_format ()
 {
@@ -54,6 +53,12 @@
                 dhit_libkpathsea_configured && \
                     dhit_check_run_without_errors updmap-sys
             fi
+            if [ "$i" = allformats ] ; then
+                for fmt in #FORMATS# ; do
+                    rm -f /var/lib/texmf/web2c/$fmt.*
+                done
+                dhit_build_format --all
+            fi
             if [ "$i" = format ] ; then
                 for fmt in #FORMATS# ; do
                     rm -f /var/lib/texmf/web2c/$fmt.*
@@ -77,3 +82,6 @@
         exit 1
     ;;
 esac
+
+# Let vim know that we don't want tabs
+# vim:set expandtab: #

Modified: tex-common/trunk/scripts/postrm-texlsr
===================================================================
--- tex-common/trunk/scripts/postrm-texlsr	2007-02-19 17:47:52 UTC (rev 2486)
+++ tex-common/trunk/scripts/postrm-texlsr	2007-02-19 17:55:04 UTC (rev 2487)
@@ -1,18 +1,17 @@
-#
-# postrm-texlsr
-#
-# postrm snippets for calling mktexlsr and update-*
-#
-# Authors:
-#       Florent Rougon <f.rougon at free.fr>
-#       Norbert Preining <preining at logic.at>
-#
+##
+## postrm-texlsr
+##
+## postrm snippets for calling mktexlsr and update-*
+##
+## Authors:
+##       Florent Rougon <f.rougon at free.fr>
+##       Norbert Preining <preining at logic.at>
+##
 # Please note that comments in this file are stripped before installation
-# by calling a grep -v '^[ \t]*#'
+# by calling a grep -v '^[ \t]*# '
+# Thus, first lines containing ## are preserved!
 # So please be careful if you add stuff here!
 #
-# Let vim know that we don't want tabs
-# vim:set expandtab: #
 
 
 # Tell if kpsewhich works. If this is the case:
@@ -78,3 +77,6 @@
         exit 1
     ;;
 esac
+
+# Let vim know that we don't want tabs
+# vim:set expandtab: #




More information about the Debian-tex-commits mailing list