Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-10-01 18:56:59 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2022-10-01 18:56:59 +0200
commit1145c3ff544846dfee971539bcbc6aed02f83cc6 (patch)
tree3edf86685fa2a8469cebee114dbe9af2854492be
parent6408c9dce00aa70ad3c6614d2d793dba9a99aff6 (diff)
updating also archlinux32-keyring
-rw-r--r--archinstall/lib/networking.py11
-rw-r--r--examples/guided.py8
2 files changed, 19 insertions, 0 deletions
diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py
index 96e8f3a1..5a60886f 100644
--- a/archinstall/lib/networking.py
+++ b/archinstall/lib/networking.py
@@ -54,6 +54,17 @@ def update_keyring() -> bool:
return False
+# TODO: this should be a function maybe upstream taking a parameter.. copy pasting for now..
+def update_keyring32() -> bool:
+ log("Updating archlinux32-keyring ...", level=logging.INFO)
+ if run_pacman("-Sy --noconfirm archlinux32-keyring").exit_code == 0:
+ return True
+
+ elif os.geteuid() != 0:
+ log("update_keyring32() uses 'pacman -Sy archlinux32-keyring' which requires root.", level=logging.ERROR, fg="red")
+
+ return False
+
def enrich_iface_types(interfaces: Union[Dict[str, Any], List[str]]) -> Dict[str, str]:
result = {}
diff --git a/examples/guided.py b/examples/guided.py
index 6f289caa..fa5d4e33 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -286,6 +286,14 @@ if not (archinstall.check_mirror_reachable() or archinstall.arguments.get('skip-
if not archinstall.arguments.get('offline'):
latest_version_archlinux_keyring = max([k.pkg_version for k in archinstall.find_package('archlinux-keyring')])
+ # For now always update for now, we don't have the coresponding package search API
+ if archinstall.arguments.get('skip-keyring-update', False) is False:
+ # Then we update the keyring in the ISO environment
+ if not archinstall.update_keyring32():
+ log_file = os.path.join(archinstall.storage.get('LOG_PATH', None), archinstall.storage.get('LOG_FILE', None))
+ archinstall.log(f"Failed to update the Arch32 keyring. Please check your internet connection and the log file '{log_file}'.", level=logging.INFO, fg="red")
+ exit(1)
+
# If we want to check for keyring updates
# and the installed package version is lower than the upstream version
if archinstall.arguments.get('skip-keyring-update', False) is False and \