[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()
This commit is contained in:
Fabio Erculiani
2011-10-06 17:50:54 +02:00
parent 2a3d3788e1
commit 3044690fa5

View File

@@ -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: