summaryrefslogtreecommitdiffstats
path: root/move
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-11-19 22:42:09 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-11-19 22:42:09 +0000
commit31fc5d17fb0ce9b0f740be68e2f9e41785e46814 (patch)
tree08658bfb2dd46031e00e5e499558bbc58b97bac5 /move
parent6c63406c04b2cc66258dfe117373adc392e80017 (diff)
downloaddrakx-backup-do-not-use-31fc5d17fb0ce9b0f740be68e2f9e41785e46814.tar
drakx-backup-do-not-use-31fc5d17fb0ce9b0f740be68e2f9e41785e46814.tar.gz
drakx-backup-do-not-use-31fc5d17fb0ce9b0f740be68e2f9e41785e46814.tar.bz2
drakx-backup-do-not-use-31fc5d17fb0ce9b0f740be68e2f9e41785e46814.tar.xz
drakx-backup-do-not-use-31fc5d17fb0ce9b0f740be68e2f9e41785e46814.zip
make_live_tree_boot replacing files by symlinks is responsible for fontconfig cache outdated, fix cache by touching files
Diffstat (limited to 'move')
-rw-r--r--move/Makefile2
-rwxr-xr-xmove/tools/fix-fc-cache.pl21
2 files changed, 23 insertions, 0 deletions
diff --git a/move/Makefile b/move/Makefile
index d46966b99..37509c327 100644
--- a/move/Makefile
+++ b/move/Makefile
@@ -78,6 +78,7 @@ install: build
live_tree_boot:
rm -f /tmp/live_tree*.clp
./make_live_tree_boot
+ tools/fix-fc-cache.pl $(DEST_LIVETREE)
$(MAKE) /tmp/live_tree_always.clp
$(MAKE) /tmp/live_tree_boot.clp
$(MAKE) /tmp/live_tree_totem.clp
@@ -85,6 +86,7 @@ live_tree_boot:
un_live_tree_boot:
./make_live_tree_boot -u
+ tools/fix-fc-cache.pl $(DEST_LIVETREE)
iso: un_live_tree_boot install live_tree_boot
rm -rf /tmp/iso /tmp/live_tree.clp
diff --git a/move/tools/fix-fc-cache.pl b/move/tools/fix-fc-cache.pl
new file mode 100755
index 000000000..e0eb19fa0
--- /dev/null
+++ b/move/tools/fix-fc-cache.pl
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+
+# touch fontconfig cache files so that fc-cache will not slow down starting of drakx
+
+use MDK::Common;
+
+my $prefix = $ARGV[0] || '/tmp/live_tree';
+
+my @conf = cat_("$prefix/etc/fonts/fonts.conf");
+
+print "touching fontconfig cache files...\n";
+foreach my $line (@conf) {
+ while ($line =~ m|<dir>([^<]+)</dir|g) {
+ my $dir = $1;
+ $dir =~ m|^/| or next;
+ foreach my $d (chomp_(`find $prefix$dir -type d 2>/dev/null`)) {
+ touch "$d/fonts.cache-1";
+ }
+ }
+}
+