From 9e207ca8a116c3d145123475b51b1938d815fd48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 2 Jun 2017 16:27:25 +0200 Subject: [PATCH] SWU: Force exact version update for OctoPrint when tracking releases --- src/octoprint/plugins/softwareupdate/__init__.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/octoprint/plugins/softwareupdate/__init__.py b/src/octoprint/plugins/softwareupdate/__init__.py index ee0df3da..b322e184 100644 --- a/src/octoprint/plugins/softwareupdate/__init__.py +++ b/src/octoprint/plugins/softwareupdate/__init__.py @@ -917,8 +917,7 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin, result["force_base"] = False if check.get("update_script", None): - # if we are using the update_script, we need to set our update_branch and force - # to install the exact version we requested + # if we are using the update_script, we need to set our update_branch if check.get("prerelease", None): # we are tracking prereleases => we want to be on the correct prerelease channel/branch @@ -928,14 +927,13 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin, # in case it's not already set result["update_branch"] = check.get("update_branch", channel) - # we also force our target version in the update - result["force_exact_version"] = True - else: # we are not tracking prereleases, but aren't on the stable branch either => switch back # to stable branch on update result["update_branch"] = check.get("update_branch", stable_branch) + # we also force an exact version + result["force_exact_version"] = True if BRANCH != result.get("prerelease_channel"): # we force python unequality check here because that will also allow us to