[neon/neon/calamares-settings/Neon/unstable] desktop: force an apt update
Jonathan Esk-Riddell
null at kde.org
Thu Sep 29 10:52:40 BST 2022
Git commit d0b0894fd13d129e6844454bbab0c9bac4f97c17 by Jonathan Esk-Riddell.
Committed on 29/09/2022 at 09:52.
Pushed by jriddell into branch 'Neon/unstable'.
force an apt update
A +7 -0 desktop/calamares/desktop/modules/shellprocess_apt_update.conf
M +4 -0 desktop/calamares/desktop/settings.conf
A +14 -0 desktop/usr/bin/calamares-apt-update
D +0 -35 desktop/usr/bin/calamares-l10n-helper
https://invent.kde.org/neon/neon/calamares-settings/commit/d0b0894fd13d129e6844454bbab0c9bac4f97c17
diff --git a/desktop/calamares/desktop/modules/shellprocess_apt_update.conf b/desktop/calamares/desktop/modules/shellprocess_apt_update.conf
new file mode 100644
index 0000000..500fd40
--- /dev/null
+++ b/desktop/calamares/desktop/modules/shellprocess_apt_update.conf
@@ -0,0 +1,7 @@
+# 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 d80c69b..d7a0f7f 100644
--- a/desktop/calamares/desktop/settings.conf
+++ b/desktop/calamares/desktop/settings.conf
@@ -9,6 +9,9 @@ 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
@@ -66,6 +69,7 @@ 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
new file mode 100755
index 0000000..0eae85b
--- /dev/null
+++ b/desktop/usr/bin/calamares-apt-update
@@ -0,0 +1,14 @@
+#!/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
deleted file mode 100755
index 41bd2c2..0000000
--- a/desktop/usr/bin/calamares-l10n-helper
+++ /dev/null
@@ -1,35 +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
-
-. /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