[neon/neon/calamares-settings/Neon/unstable] desktop: Revert "force an apt update"
Jonathan Esk-Riddell
null at kde.org
Thu Sep 29 12:23:38 BST 2022
Git commit b2dd862b4fd7209ba0f001f950d04aa30ee1fe05 by Jonathan Esk-Riddell.
Committed on 29/09/2022 at 11:23.
Pushed by jriddell into branch 'Neon/unstable'.
Revert "force an apt update"
This reverts commit d0b0894fd13d129e6844454bbab0c9bac4f97c17.
D +0 -7 desktop/calamares/desktop/modules/shellprocess_apt_update.conf
M +0 -4 desktop/calamares/desktop/settings.conf
D +0 -14 desktop/usr/bin/calamares-apt-update
A +35 -0 desktop/usr/bin/calamares-l10n-helper
https://invent.kde.org/neon/neon/calamares-settings/commit/b2dd862b4fd7209ba0f001f950d04aa30ee1fe05
diff --git a/desktop/calamares/desktop/modules/shellprocess_apt_update.conf b/desktop/calamares/desktop/modules/shellprocess_apt_update.conf
deleted file mode 100644
index 500fd40..0000000
--- a/desktop/calamares/desktop/modules/shellprocess_apt_update.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# SPDX-FileCopyrightText: 2018-2019 Harald Sitter <sitter at kde.org>
-# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
----
-dontChroot: false
-timeout: 1800
-script:
- - calamares-apt-update
diff --git a/desktop/calamares/desktop/settings.conf b/desktop/calamares/desktop/settings.conf
index d7a0f7f..d80c69b 100644
--- a/desktop/calamares/desktop/settings.conf
+++ b/desktop/calamares/desktop/settings.conf
@@ -9,9 +9,6 @@ instances:
- id: install_translations
module: shellprocess
config: shellprocess_install_translations.conf
-- id: apt_update
- module: shellprocess
- config: shellprocess_apt_update.conf
- id: before_bootloader
module: contextualprocess
config: before_bootloader_context.conf
@@ -69,7 +66,6 @@ sequence:
- shellprocess at nomodeset
- shellprocess at install_translations
- packages
- - shellprocess at apt_update
- neon-fs-cleanup
- shellprocess at logs
- umount
diff --git a/desktop/usr/bin/calamares-apt-update b/desktop/usr/bin/calamares-apt-update
deleted file mode 100755
index 0eae85b..0000000
--- a/desktop/usr/bin/calamares-apt-update
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-# SPDX-FileCopyrightText: 2018-2019 Harald Sitter <sitter at kde.org>
-# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
-
-# calamares currently has subpar l10n capabilites.
-# this helper is ment to aid in getting very primitive language support
-# of the ground by using a helper from ubuntu's language-selector-common
-# to retrieve a list of packages required for the chosen system language
-# and then manually installig it.
-# https://github.com/calamares/calamares/issues/924
-
-set -ex
-
-apt-get update || true
diff --git a/desktop/usr/bin/calamares-l10n-helper b/desktop/usr/bin/calamares-l10n-helper
new file mode 100755
index 0000000..41bd2c2
--- /dev/null
+++ b/desktop/usr/bin/calamares-l10n-helper
@@ -0,0 +1,35 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2018-2019 Harald Sitter <sitter at kde.org>
+# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
+
+# calamares currently has subpar l10n capabilites.
+# this helper is ment to aid in getting very primitive language support
+# of the ground by using a helper from ubuntu's language-selector-common
+# to retrieve a list of packages required for the chosen system language
+# and then manually installig it.
+# https://github.com/calamares/calamares/issues/924
+
+set -ex
+
+. /etc/default/locale
+
+echo $LANG
+echo $LC_TIME
+without_ext=$(echo $LANG | cut -d. -f1)
+
+# Calamares technically should mangle locale.gen, but it's broken
+# https://github.com/calamares/calamares/issues/940
+# To unbreak this call locale-gen manually with LC_TIME. This may be the same
+# as LANG, which gets set up by lang-pack-en-base
+# (installed by check-language-support).
+# But since the pack may be any language and network might not be available
+# we set up both the LANG and LC_TIME so that both are definitely set up
+# regardless of network availablity or calamares bugs.
+# NB: this is a special way of calling it unique to Ubuntu which will mangle
+# the config and enable it in one go
+/usr/sbin/locale-gen --keep-existing "$LANG"
+/usr/sbin/locale-gen --keep-existing "$LC_TIME"
+
+apt-get update || true
+missing=$(check-language-support --language="$without_ext")
+apt-get install -y $missing || true
More information about the Neon-commits
mailing list