From: Michael Tremer Date: Thu, 9 Apr 2026 08:57:32 +0000 (+0000) Subject: configroot: Build language cache at build time X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c0767ffc4cffc85c2e4ac43decfa9de85c33d5f;p=ipfire-2.x.git configroot: Build language cache at build time This should not be done when the system is being installed as there is no reason to. Signed-off-by: Michael Tremer --- diff --git a/config/rootfiles/common/configroot b/config/rootfiles/common/configroot index 7cc93302f..d289141e1 100644 --- a/config/rootfiles/common/configroot +++ b/config/rootfiles/common/configroot @@ -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 diff --git a/lfs/configroot b/lfs/configroot index b4f412a8a..d0e712070 100644 --- a/lfs/configroot +++ b/lfs/configroot @@ -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) diff --git a/lfs/flash-images b/lfs/flash-images index e7e5ea8b2..56f8bfc69 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -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 diff --git a/src/installer/main.c b/src/installer/main.c index f8800a657..911eedebd 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -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)) {