[Sugar-devel] [PATCH sugar] Only consider the exact same version of a bundle as installed (fixes SL#3081)
Simon Schampijer
simon at schampijer.de
Wed Sep 7 11:13:07 EDT 2011
On 09/04/2011 10:52 PM, Sascha Silbe wrote:
> 49232e55 introduced a typo that caused a bundle to be considered installed
> even if it contained an older version than what was actually installed. This
> is turn triggered the "upgrade" logic in jarabe.journal.misc.resume().
>
> The result was that activities got downgraded without asking the user for
> confirmation.
>
> Signed-off-by: Sascha Silbe<silbe at activitycentral.com>
> ---
> src/jarabe/model/bundleregistry.py | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py
> index 63308bb..26e719f 100644
> --- a/src/jarabe/model/bundleregistry.py
> +++ b/src/jarabe/model/bundleregistry.py
> @@ -360,7 +360,7 @@ def is_installed(self, bundle):
>
> for installed_bundle in self._bundles:
> if bundle.get_bundle_id() == installed_bundle.get_bundle_id() and \
> - NormalizedVersion(bundle.get_activity_version())<= \
> + NormalizedVersion(bundle.get_activity_version()) == \
> NormalizedVersion(installed_bundle.get_activity_version()):
> return True
> return False
Thanks for the patch, acked and pushed as:
http://git.sugarlabs.org/sugar/mainline/commit/69d7d6e675659a52152f4fe3692614ed63a4be21
Regards,
Simon
More information about the Sugar-devel
mailing list