#10379 HIGH 10.1.3: Implement dotted activity versions to sugar 0.84
Zarro Boogs per Child
bugtracker at laptop.org
Mon Nov 15 02:40:25 EST 2010
#10379: Implement dotted activity versions to sugar 0.84
-----------------------------------+----------------------------------------
Reporter: godiard | Owner: godiard
Type: enhancement | Status: new
Priority: high | Milestone: 10.1.3
Component: sugar | Version: Development build as of this date
Resolution: | Keywords:
Next_action: package | Verified: 0
Deployment_affected: | Blockedby:
Blocking: |
-----------------------------------+----------------------------------------
Comment(by erikos):
This change in the olpc-os-builder is needed in order to make it work for
the new activity scheme. We check if a new activity version has to be
downloaded or if it is already in the cache. The version comparing code is
in sugar-toolkit. I wanted to avoid the dependency on the toolkit and just
compare the string if an activity is already in the cache.
{{{
diff --git a/modules/sugar_activity_group/kspost.60.nochroot.activities.py
b/modules/sugar_activity_group/kspost.60.nochroot.activit
index 8b055e0..e8d7728 100644
--- a/modules/sugar_activity_group/kspost.60.nochroot.activities.py
+++ b/modules/sugar_activity_group/kspost.60.nochroot.activities.py
@@ -84,7 +84,7 @@ class _UpdateHTMLParser(HTMLParser):
self.last_id = data.strip()
if self.in_activity_version > 0:
try:
- self.last_version = long(data.strip())
+ self.last_version = data.strip()
except:
if _DEBUG_PARSER:
print "BAD VERSION NUMBER:", self.last_id, data
@@ -129,7 +129,7 @@ def only_best_update(version_list):
`parse_html` and return the "best" one."""
bestv, bestu = None, None
for ver, url in version_list:
- if bestv is None or ver > bestv:
+ if bestv is None or ver != bestv:
bestv, bestu = ver, url
return bestv, bestu
@@ -201,7 +201,7 @@ if install_activities:
for name, info in results.items():
(version, url) = only_best_update(info)
- print >>sys.stderr, "Examining", name, "v%d" % version
+ print >>sys.stderr, "Examining", name, "v%s" % version
fd = urllib2.urlopen(url)
headers = fd.info()
if not 'Content-length' in headers:
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/10379#comment:12>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list