[Debian-tex-commits] SVN tex-common commit + diffs: r2497 - tex-common/trunk/scripts

Frank Küster frank at alioth.debian.org
Tue Feb 20 15:52:48 CET 2007


Author: frank
Date: 2007-02-20 15:52:48 +0100 (Tue, 20 Feb 2007)
New Revision: 2497

Modified:
   tex-common/trunk/scripts/dh_installtex
Log:
- use dh{ONLYSCRIPTS} syntactically correct
- fix regex in extract_format
- add mkdir before creating the format links


Modified: tex-common/trunk/scripts/dh_installtex
===================================================================
--- tex-common/trunk/scripts/dh_installtex	2007-02-20 13:43:06 UTC (rev 2496)
+++ tex-common/trunk/scripts/dh_installtex	2007-02-20 14:52:48 UTC (rev 2497)
@@ -288,7 +288,7 @@
 
 sub extract_format {
 	my ($line) = @_;
-	if ($line =~ m/^([^#\s]\S+)\s*(\S*)\s+) {
+	if ($line =~ m/^([^#\s]\S+)\s*(\S*)\s+/) {
 		return "$1\t$2";
 	}
 }
@@ -451,9 +451,9 @@
 			error("This call would create multiple copies of $priority$package.$configfileext{$_}.\nPlease read the man page on how this should be fixed!\n");
 		}
 
-        	if ( ! -d "$tmp/etc/texmf/$configdir{$type}/") {
+        	if ( ! $dh{ONLYSCRIPTS} && ! -d "$tmp/etc/texmf/$configdir{$type}/") {
 			doit("install","-d","$tmp/etc/texmf/$configdir{$type}/");
-        	} unless ($dh{ONLYSCRIPTS});
+        	};
 		#
 		# the cmd line cfg files
 		#
@@ -513,7 +513,7 @@
 			}
 			close(CFGFILE);
 			push @listlines, "$priority$package";
-		} unless ($dh{ONLYSCRIPTS});
+		};
 
 	      WRITELISTFILE: do {
         	if ( ! -d "$tmp/var/lib/tex-common/$managedir{$type}/") {
@@ -533,9 +533,10 @@
 	if (defined($data{"map"})) {
 		@mapdata = @{$data{"map"}};
 	}
-	if ($#mapdata >= 0) {
+	if ( ! $dh{ONLYSCRIPTS} && ($#mapdata >= 0) ) {
 		doit("install","-d","$tmp/usr/share/texmf/dvips/config/");
-	} unless ($dh{ONLYSCRIPTS});
+	};
+ INSTALLDVIPSCONF: do {
 	foreach $i (@mapdata) {
 		my $font = $i;
 		$font =~ s/\.map$//;
@@ -547,25 +548,29 @@
 		verbose_print("Writing $dofilen");
 		print CNFFILE "p +$i\n";
 		close(CNFFILE);
-        } unless ($dh{ONLYSCRIPTS});
+        } 
+	} unless ($dh{ONLYSCRIPTS});
 
 	my @fmtpairs = ();
 	my @fmtdata = ();
 	if (defined($data{"format"})) {
 		@fmtpairs = @{$data{"format"}};
 	}
+ installformatlink: do {
 	foreach my $pair (@fmtpairs) {
 		my ($format,$engine) = $pair =~ m/^(.*)\t(.*)$/;
 		push @fmtdata, $format;
-		if ($doformatlinks) {
+		if ($doformatlinks && ($format ne $engine)) {
 		  my $formatlink = "$tmp/usr/bin/$format";
 		  if ( -e $formatlink ) {
 		    warning("/usr/bin/$format already exists, skipping");
 		  } else {
-		    doit("ln","-s","$engine",$formatlink);
+		    doit("mkdir","-p","$tmp/usr/bin");
+		    doit("ln","-s","$engine","$formatlink");
 		  };
 		}
-	} unless ($dh{ONLYSCRIPTS});
+	} 
+}unless ($dh{ONLYSCRIPTS});
 
 	if ($#addbuildformats >= 0) {
 		push @fmtdata, @addbuildformats;




More information about the Debian-tex-commits mailing list