]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
configroot: Build language cache at build time
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Apr 2026 08:57:32 +0000 (08:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Apr 2026 08:57:32 +0000 (08:57 +0000)
This should not be done when the system is being installed as there is
no reason to.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/common/configroot
lfs/configroot
lfs/flash-images
src/installer/main.c

index 7cc93302fdd14083af76a11a24696aa2271c63c7..d289141e15d9f6660539dbb550f427cb4a9feaa7 100644 (file)
@@ -91,6 +91,17 @@ var/ipfire/ipblocklist-functions.pl
 var/ipfire/key
 var/ipfire/lang.pl
 var/ipfire/langs
+#var/ipfire/langs/cache-lang.pl.de
+#var/ipfire/langs/cache-lang.pl.en
+#var/ipfire/langs/cache-lang.pl.es
+#var/ipfire/langs/cache-lang.pl.fr
+#var/ipfire/langs/cache-lang.pl.it
+#var/ipfire/langs/cache-lang.pl.nl
+#var/ipfire/langs/cache-lang.pl.pl
+#var/ipfire/langs/cache-lang.pl.ru
+#var/ipfire/langs/cache-lang.pl.tr
+#var/ipfire/langs/cache-lang.pl.tw
+#var/ipfire/langs/cache-lang.pl.zh
 #var/ipfire/langs/de.pl
 #var/ipfire/langs/en.pl
 #var/ipfire/langs/es.pl
index b4f412a8af6dd51a57af1e6e1f5355b48ed71f1f..d0e7120704b630b9d7ce3eaadc70ef694694a1d5 100644 (file)
@@ -181,4 +181,7 @@ $(TARGET) :
        chown -Rv root:root $(CONFIG_ROOT)/*/bin
        chown root:nobody $(CONFIG_ROOT)/dhcpc
 
+       # Build the language cache
+       /usr/local/bin/update-lang-cache
+
        @$(POSTBUILD)
index e7e5ea8b2a6eab5cad0acee0aa17486111901d18..56f8bfc69b544712d1a13a48dd4299fea0a41c40 100644 (file)
@@ -154,8 +154,6 @@ endif
        mount --bind /dev  $(MNThdd)/dev
        mount --bind /sys  $(MNThdd)/sys
 
-       chroot $(MNThdd) /usr/bin/perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
-
        # Run the filesystem cleanup script
        chroot $(MNThdd) /usr/local/bin/filesystem-cleanup > $(DIR_TMP)/cleanup.log
 
index f8800a657586afbd8cbea5be2e54aaec2caea415..911eedebda8f56fb62f184e905211f132485c117 100644 (file)
@@ -758,13 +758,6 @@ int main(int argc, char *argv[]) {
        /* Save language und local settings */
        write_lang_configs(config.language);
 
-       /* Build cache lang file */
-       snprintf(commandstring, STRING_SIZE, "/usr/sbin/chroot /harddisk /usr/bin/perl -e \"require '" CONFIG_ROOT "/lang.pl'; &Lang::BuildCacheLang\"");
-       if (runcommandwithstatus(commandstring, title, _("Installing the language cache..."), logfile)) {
-               errorbox(_("Unable to install the language cache."));
-               goto EXIT;
-       }
-
        /* trigger udev to add disk-by-uuid entries */
        snprintf(commandstring, STRING_SIZE, "/usr/sbin/chroot /harddisk /bin/udevadm trigger");
        if (runcommandwithstatus(commandstring, title, _("Trigger udev to redetect partitions..."), logfile)) {