From 3044690fa58a86698502d967fc4e110e9b921a65 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 6 Oct 2011 17:50:54 +0200 Subject: [PATCH] [entropy.server] open_server_repository(): always check effective rw status when needed Check if the repository is actually accessibile in write mode before calling package_names_update() --- libraries/entropy/server/interfaces/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/entropy/server/interfaces/main.py b/libraries/entropy/server/interfaces/main.py index 2666d3083..4fe193866 100644 --- a/libraries/entropy/server/interfaces/main.py +++ b/libraries/entropy/server/interfaces/main.py @@ -4408,7 +4408,10 @@ class Server(Client): # sometimes, when filling a new server db # we need to avoid tree updates if valid: - if do_treeupdates: + if do_treeupdates and not conn.readonly(): + # readonly() always returns the effective + # write access to repository (despire what is + # really set during instantiation) self._repository_packages_spm_sync(repository_id, conn, branch = use_branch) elif warnings and not is_new: