[sugar] Feature/string freeze exception: 7534: need_upgrade() always True

Jameson "Chema" Quinn jquinn at cs.oberlin.edu
Wed Jul 16 20:43:39 EDT 2008


Currently, when you ask activitybundle.py to install an xo bundle, it first
checks need_upgrade. This returns False in only one circumstance: when the
installed version has the same version number as the new version. In that
circumstance, the install silently fails, as it presumes same version number
means same xo bundle. This assumption, and thus this behaviour, is dangerous
- the effect would be to silently "block out" the installation of a specific
bundle version. The workaround would be simple, but the diagnosis would be
hard in the field; it could arise from malice, individual error, or even
countrywide error (country X creates a "new version" with changed icons,
later a crucial security fix collides with the country X version number...).

It is also very annoying if you're using Develop, because it forces you to
churn the version number (up or down, it doesn't matter) on every debug
cycle.

My posted patch simply has need_upgrade always return true. It is called in
only one place - in datastore.py DSObject.resume(). The downside is only
that manually reinstalling the same bundle will actually reinstall it,
instead of quickly and silently deciding not to - which seems to me a
non-helpful optimization, since the time it saves will be orders of
magnitude less than the debugging time it causes. The need_upgrade function
remains, for later when we do have a cryptographically solid way of checking
bundle identity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/sugar/attachments/20080716/055c27cc/attachment-0001.htm 


More information about the Sugar mailing list