From ac5132227c55465eb8af616fdd4df360100a30a6 Mon Sep 17 00:00:00 2001 From: Alexander van der Grinten Date: Sun, 10 Nov 2024 22:56:20 +0100 Subject: [PATCH] base: Gracefully handle missing repodata --- xbstrap/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xbstrap/base.py b/xbstrap/base.py index abba0af..9917e0f 100644 --- a/xbstrap/base.py +++ b/xbstrap/base.py @@ -794,7 +794,10 @@ def download_remote_xbps_repodata(self, arch): def access_local_xbps_repodata(self, arch): rd_path = os.path.join(self.xbps_repository_dir, f"{arch}-repodata") - index = _xbps_utils.read_repodata(rd_path) + try: + index = _xbps_utils.read_repodata(rd_path) + except FileNotFoundError: + return {} return index def get_installed_pkgs(self):