From 687e5297283bdeb8c575baca4fd123b4223847aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Wed, 26 May 2010 13:11:04 +0000 Subject: [PATCH] repodb: Do not search index files of local repos in /var/lib/pisi BUG:FIXED:13156 --- pisi/db/repodb.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pisi/db/repodb.py b/pisi/db/repodb.py index 0339c32c..0056032d 100644 --- a/pisi/db/repodb.py +++ b/pisi/db/repodb.py @@ -151,11 +151,14 @@ class RepoDB(lazydb.LazyDB): def get_repo_doc(self, repo_name): repo = self.get_repo(repo_name) - index = os.path.basename(repo.indexuri.get_uri()) - index_path = pisi.util.join_path(ctx.config.index_dir(), repo_name, index) + if repo.indexuri.is_remote_file(): + index = os.path.basename(repo.indexuri.get_uri()) + index_path = pisi.util.join_path(ctx.config.index_dir(), repo_name, index) + else: + index_path = repo.indexuri.get_uri() if index_path.endswith("bz2"): - index_path = index_path.split(".bz2")[0] + index_path = pisi.util.remove_suffix(".bz2", index_path) if not os.path.exists(index_path): ctx.ui.warning(_("%s repository needs to be updated") % repo_name)