Author: preining-guest
Date: 2005-10-17 00:06:17 +0000 (Mon, 17 Oct 2005)
New Revision: 249

Modified:
   tex-common/trunk/scripts/dh_installtexfonts
Log:
priority changes with multiple cfg files


Modified: tex-common/trunk/scripts/dh_installtexfonts
===================================================================
--- tex-common/trunk/scripts/dh_installtexfonts 2005-10-16 23:52:07 UTC (rev 
248)
+++ tex-common/trunk/scripts/dh_installtexfonts 2005-10-17 00:06:17 UTC (rev 
249)
@@ -79,7 +79,7 @@
        my @cmdlinemaps;
        my @cmdlinecfgs;
        my $pkgfilepresent = 0;
-       my $pkgfileext = "";
+       my $pkgfileext = 0;
        my @listlines;
 
        if (defined($dh{PRIORITY}) && $dh{PRIORITY} ne '') {
@@ -98,7 +98,7 @@
                        } elsif ($entry =~ m/\.cfg$/) {
                                my $bn=basename($entry);
                                if ($entry eq "$package.cfg") {
-                                       $pkgfileext = "1";
+                                       $pkgfileext++;
                                }
                                push @cmdlinecfgs, $entry;
                        } else {
@@ -143,11 +143,12 @@
        # now debian/package.maps and/or debian/maps
        #
        if ($pkgfilepresent) {
-               # here we rely on $pkgfileext either being "" or being "2"
-               open(CFGFILE, 
">$tmp/etc/texmf/updmap.d/$priority$package$pkgfileext.cfg") || 
-                       error("Cannot open 
$tmp/etc/texmf/updmap.d/$priority$package$pkgfileext.cfg for writing!");
+               my $p = $priority + $pkgfileext;
+               $pkgfileext++;
+               open(CFGFILE, ">$tmp/etc/texmf/updmap.d/$p$package.cfg") || 
+                       error("Cannot open 
$tmp/etc/texmf/updmap.d/$p$package.cfg for writing!");
                print CFGFILE <<EOF;
-# $priority$package$pkgfileext.cfg
+# $p$package.cfg
 # You can change/add entries to this file and changes will be preserved
 # over upgrades, even if you have removed the main package prior
 # (not if you purged it). You should leave the following pseudo comment
@@ -159,17 +160,17 @@
                        print CFGFILE "$_";
                }
                close(CFGFILE);
-               push @listlines, "$priority$package$pkgfileext";
+               push @listlines, "$p$package";
        }
        #
        # finally do the cmdline maps
        #
        if ($#cmdlinemaps >= 0) {
-               $pkgfileext++;
-               open(CFGFILE, 
">$tmp/etc/texmf/updmap.d/$priority$package$pkgfileext.cfg") || 
-                       error("Cannot open 
$tmp/etc/texmf/updmap.d/$priority$package$pkgfileext.cfg for writing!");
+               my $p = $priority + $pkgfileext;
+               open(CFGFILE, ">$tmp/etc/texmf/updmap.d/$p$package.cfg") || 
+                       error("Cannot open 
$tmp/etc/texmf/updmap.d/$p$package.cfg for writing!");
                print CFGFILE <<EOF;
-# $priority$package$pkgfileext.cfg
+# $p$package.cfg
 # You can change/add entries to this file and changes will be preserved
 # over upgrades, even if you have removed the main package prior
 # (not if you purged it). You should leave the following pseudo comment
@@ -181,7 +182,7 @@
                        print CFGFILE "$_\n";
                }
                close(CFGFILE);
-               push @listlines, "$priority$package$pkgfileext";
+               push @listlines, "$p$package";
        }
 
        


_______________________________________________
Pkg-tetex-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-tetex-commits

Reply via email to