[Bugs] #1042 UNSP: cannot install new activity version
SugarLabs Bugs
bugtracker-noreply at sugarlabs.org
Sun Jul 12 09:51:57 EDT 2009
#1042: cannot install new activity version
------------------------------------------+---------------------------------
Reporter: sascha_silbe | Owner: tomeu
Type: defect | Status: new
Priority: Unspecified by Maintainer | Milestone: 0.86
Component: sugar | Version: Git as of bugdate
Severity: Major | Keywords:
Distribution: Unspecified | Status_field: New
------------------------------------------+---------------------------------
After downloading the new version of Read Etexts (a later version was
already installed) and clicking "Show in Journal", the following exception
occured:
{{{
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 214, in
maybe_handle_message
self._handler(*args, **kwargs)
File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
packages/jarabe/journal/model.py", line 380, in _datastore_updated_cb
updated.send(None, tree_id=tree_id, version_id=version_id)
File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
packages/sugar/dispatch/dispatcher.py", line 125, in send
response = receiver(signal=self, sender=sender, **named)
File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
packages/jarabe/journal/journalactivity.py", line 250, in
__model_updated_cb
self._check_for_bundle(kwargs['tree_id'], kwargs['version_id'])
File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
packages/jarabe/journal/journalactivity.py", line 283, in
_check_for_bundle
registry.install(bundle)
File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
packages/jarabe/model/bundleregistry.py", line 330, in install
raise AlreadyInstalledException
AlreadyInstalledException
}}}
jarabe.model.bundleregistry.!BundleRegistry.install() contains the
following code:
{{{
if self.get_bundle(bundle.get_bundle_id()):
raise AlreadyInstalledException
for installed_bundle in self._bundles:
if bundle.get_bundle_id() == installed_bundle.get_bundle_id()
and \
bundle.get_activity_version() == \
installed_bundle.get_activity_version():
raise AlreadyInstalledException
elif bundle.get_bundle_id() ==
installed_bundle.get_bundle_id():
self.uninstall(installed_bundle, force=True)
}}}
get_bundle() contains a similar loop like install() but only checks the
bundle id, not the activity version. So install() will always fail with
!AlreadyInstalledException, even when we're trying to install a different
version.
After removing the if self.get_bundle... several other errors came up, so
can't verify this as the correct fix (yet).
--
Ticket URL: <http://dev.sugarlabs.org/ticket/1042>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list