Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorTimothy Pidashev <pidashev.tim@gmail.com>2022-01-30 02:01:04 -0800
committerGitHub <noreply@github.com>2022-01-30 11:01:04 +0100
commit179c103cddf930b91ffa82a9feee37c7f2487ed8 (patch)
tree6965d69447711fe5df929cccbc8929653fa53049 /archinstall/lib
parent275a960e6cb7163f4f37c4d16a4a62f599046613 (diff)
Synchronize `archlinux-keyring` when running guided.py (#917)
* Update guided.py * Update guided.py * Update guided.py * Fix typo * Format string properly; elaborate log msg * Make change consistent to mirror-check * Update documentation
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/networking.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py
index 6b09deba..82754b58 100644
--- a/archinstall/lib/networking.py
+++ b/archinstall/lib/networking.py
@@ -40,6 +40,16 @@ def check_mirror_reachable() -> bool:
return False
+def update_keyring() -> bool:
+ log("Updating archlinux-keyring ...", level=logging.INFO)
+ if SysCommand("pacman -Sy archlinux-keyring").exit_code == 0:
+ return True
+
+ elif os.geteuid() != 0:
+ log("update_keyring() uses 'pacman -Sy archlinux-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 = {}