Skip to content
Permalink
Browse files

[Plugin installer] Fix broken warning about outdated plugin updates i…

…n the user directory masking a newer core version
  • Loading branch information
borysiasty committed Nov 3, 2017
1 parent 67b1cab commit fb7f8f17f74ac5f888affa2f0309ef2dc04688a8
Showing with 3 additions and 3 deletions.
  1. +2 −2 python/pyplugin_installer/installer.py
  2. +1 −1 python/pyplugin_installer/installer_data.py
@@ -82,7 +82,7 @@ def __init__(self):
for key in repositories.allEnabled():
repositories.setRepositoryData(key, "state", 3)

# look for obsolete plugins (the user-installed one is newer than core one)
# look for obsolete plugins updates (the user-installed one is older than the core one)
for key in plugins.obsoletePlugins:
plugin = plugins.localCache[key]
msg = QMessageBox()
@@ -93,7 +93,7 @@ def __init__(self):
msg.setText("%s <b>%s</b><br/><br/>%s" % (self.tr("Obsolete plugin:"), plugin["name"], self.tr("QGIS has detected an obsolete plugin that masks its more recent version shipped with this copy of QGIS. This is likely due to files associated with a previous installation of QGIS. Do you want to remove the old plugin right now and unmask the more recent version?")))
msg.exec_()
if not msg.result():
# uninstall, update utils and reload if enabled
# uninstall the update, update utils and reload if enabled
self.uninstallPlugin(key, quiet=True)
updateAvailablePlugins()
settings = QgsSettings()
@@ -708,10 +708,10 @@ def getAllInstalled(self, testLoad=True):
# failedToLoad = settings.value("/PythonPlugins/watchDog/" + key) is not None
testLoadThis = testLoad and key not in qgis.utils.plugins
plugin = self.getInstalledPlugin(key, path=path, readOnly=readOnly, testLoad=testLoadThis)
self.localCache[key] = plugin
if key in list(self.localCache.keys()) and compareVersions(self.localCache[key]["version_installed"], plugin["version_installed"]) == 1:
# An obsolete plugin in the "user" location is masking a newer one in the "system" location!
self.obsoletePlugins += [key]
self.localCache[key] = plugin
except:
# it's not necessary to stop if one of the dirs is inaccessible
pass

0 comments on commit fb7f8f1

Please sign in to comment.
You can’t perform that action at this time.