From 2b76833202c750b42c7d47891061713cc7a20b26 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sat, 24 May 2025 17:31:31 +0200 Subject: [PATCH 1/2] Added a more humane error message on no initial network --- archinstall/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/archinstall/__init__.py b/archinstall/__init__.py index df853bcfd1..676fc00456 100644 --- a/archinstall/__init__.py +++ b/archinstall/__init__.py @@ -40,6 +40,11 @@ def _fetch_arch_db() -> None: try: Pacman.run('-Sy') except Exception as e: + error("Failed to sync Arch Linux package database.") + if 'could not resolve host' in str(e).lower(): + error("Most likely due to a missing network connection or DNS issue.") + error("Run archinstall --debug and check /var/log/archinstall/install.log for details.") + debug(f'Failed to sync Arch Linux package database: {e}') exit(1) From 22930a9ee44c8d40dcff5fe20cef457f476646d7 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sat, 24 May 2025 17:34:00 +0200 Subject: [PATCH 2/2] Fixed ruff complaints --- archinstall/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archinstall/__init__.py b/archinstall/__init__.py index 676fc00456..7e086e6e34 100644 --- a/archinstall/__init__.py +++ b/archinstall/__init__.py @@ -40,10 +40,10 @@ def _fetch_arch_db() -> None: try: Pacman.run('-Sy') except Exception as e: - error("Failed to sync Arch Linux package database.") + error('Failed to sync Arch Linux package database.') if 'could not resolve host' in str(e).lower(): - error("Most likely due to a missing network connection or DNS issue.") - error("Run archinstall --debug and check /var/log/archinstall/install.log for details.") + error('Most likely due to a missing network connection or DNS issue.') + error('Run archinstall --debug and check /var/log/archinstall/install.log for details.') debug(f'Failed to sync Arch Linux package database: {e}') exit(1)