Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-09-18 15:04:11 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-09-18 15:04:11 (GMT)
commit8b5c0018308b87fc00329d02a38410ce77bf8482 (patch)
tree2d04ffae39481cd5e9a8501339afed0770c21dce
parent522116f3cb21a9fbbea273c1d4c06adb60dfedaa (diff)
ASLO knows only about stable SP releases #1369
-rw-r--r--extensions/cpsection/updater/backends/aslo.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/extensions/cpsection/updater/backends/aslo.py b/extensions/cpsection/updater/backends/aslo.py
index 443fd1c..5f257f9 100644
--- a/extensions/cpsection/updater/backends/aslo.py
+++ b/extensions/cpsection/updater/backends/aslo.py
@@ -62,7 +62,7 @@ _FIND_VERSION = './/{http://www.mozilla.org/2004/em-rdf#}version'
_FIND_LINK = './/{http://www.mozilla.org/2004/em-rdf#}updateLink'
_FIND_SIZE = './/{http://www.mozilla.org/2004/em-rdf#}updateSize'
-_UPDATE_PATH = 'http://activities.sugarlabs.org/services/update.php'
+_UPDATE_PATH = 'http://activities.sugarlabs.org/services/update-aslo.php'
_fetcher = None
@@ -72,9 +72,14 @@ class _UpdateFetcher(object):
_CHUNK_SIZE = 10240
def __init__(self, bundle, completion_cb):
+ # ASLO knows only about stable SP releases
+ major, minor = config.version.split('.')[0:2]
+ sp_version = '%s.%s' % (major, int(minor) + int(minor) % 2)
url = '%s?id=%s&appVersion=%s' % \
- (_UPDATE_PATH, bundle.get_bundle_id(), config.version)
+ (_UPDATE_PATH, bundle.get_bundle_id(), sp_version)
+
+ logging.debug('Fetch %s', url)
self._completion_cb = completion_cb
self._file = gio.File(url)