summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-11-13 12:57:53 +0000
committerNorbert Preining <preining@logic.at>2008-11-13 12:57:53 +0000
commita2fa99de9b89b81721c30e133837d102e40020d5 (patch)
treec7ef39ae4ae192438ea860e2b0cb6e2a90d7130b /Master
parente511e93c2d5092b3b009eac9a0c6c4e62507261d (diff)
try to work around fc-cache problems on w32
git-svn-id: svn://tug.org/texlive/trunk@11286 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLPostActions.pm22
1 files changed, 19 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLPostActions.pm b/Master/tlpkg/TeXLive/TLPostActions.pm
index e91a468f457..b433437b258 100644
--- a/Master/tlpkg/TeXLive/TLPostActions.pm
+++ b/Master/tlpkg/TeXLive/TLPostActions.pm
@@ -17,7 +17,8 @@ BEGIN {
@EXPORT = @EXPORT_OK;
}
-use TeXLive::TLUtils qw(win32 mkdirhier copy conv_to_w32_path log debug info);
+use TeXLive::TLUtils qw(win32 mkdirhier copy conv_to_w32_path log debug info
+ touch);
use TeXLive::TLWinGoo;
my $mainmenu = "TeX Live 2008";
@@ -74,7 +75,7 @@ sub do_install_xetex {
chomp($texmfsysvar);
}
if (-r "$texdir/bin/win32/conf/fonts.conf") {
- # we have installed win32, so put it into texmfsysvar
+ # we have installed w32, so put it into texmfsysvar
mkdirhier("$texmfsysvar/fonts");
TeXLive::TLUtils::rmtree("$texmfsysvar/fonts/conf");
TeXLive::TLUtils::rmtree("$texmfsysvar/fonts/cache");
@@ -103,6 +104,21 @@ sub do_install_xetex {
$winfontdir = $ENV{'SystemRoot'}.'/fonts';
$winfontdir =~ s!\\!/!g;
#mkdirhier("$texmfsysvar/fonts/cache");
+
+ # fc-cache breaks often on w32 in some strange way
+ # there are claims that touching a font file in $winfontdir
+ # would solve that problem. So lets touch some of them
+ if (opendir (WINFONT, $winfontdir)) {
+ my @dirents = readdir (WINFONT);
+ closedir (WINFONT) || warn "closedir($winfontdir) failed: $!";
+ for my $dirent (@dirents) {
+ if ($dirent =~ m/\.(ttf|otf)$/i) {
+ touch($dirent);
+ # one file touched should be enough
+ last;
+ }
+ }
+ }
}
foreach (@lines) {
$_ =~ s!c:/Program Files/texlive/2008!$texdir!;
@@ -120,7 +136,7 @@ sub do_install_xetex {
warn("Cannot open $texdir/bin/win32/conf/fonts.conf\n");
}
}
- # call fc-cache but only when we install on win32!
+ # call fc-cache but only when we install on w32!
if (win32()) {
info("Running fc-cache -v -r\n");
log(`fc-cache -v -r 2>&1`);