[Sugar-devel] 0depend feature request

Michael Stone michael at laptop.org
Tue Nov 24 15:01:07 EST 2009

Aleksey wrote:

> To have some implementation mockups for next 0install debates,
> I've coded how(I'm thinking) 0install integration could be implemented
> in sugar[1]. To check existed code, pull sugar and sugar-toolkit cloned
> repos[2] and follow simple test case[3].
> [1] http://wiki.sugarlabs.org/go/Zero_Depend
> [2] http://wiki.sugarlabs.org/go/Zero_Depend#Scope
> [3] http://wiki.sugarlabs.org/go/Zero_Depend#How_To_Test


I tried out your patches in a Debian Sid chroot with


installed and got the following exception in shell.log when running your test

   Traceback (most recent call last):
     File "/usr/lib/python2.5/site-packages/jarabe/desktop/favoritesview.py", line 519, in __button_release_event_cb
     File "/usr/lib/python2.5/site-packages/jarabe/desktop/favoritesview.py", line 531, in _activate
     File "/usr/lib/python2.5/site-packages/jarabe/desktop/favoritesview.py", line 524, in _resume
       shell.resume(journal_entry, self._activity_info.get_bundle_id())
     File "/usr/lib/python2.5/site-packages/jarabe/util/shell.py", line 222, in resume
       launch(bundle, handle, get_icon_color(metadata))
     File "/usr/lib/python2.5/site-packages/jarabe/util/shell.py", line 238, in launch
       launcher.add_launcher(bundle, activity_handle, color)
     File "/usr/lib/python2.5/site-packages/jarabe/view/launcher.py", line 185, in add_launcher
       zdepend.fetch(zfeed, progress, create_activity, cancel)
     File "/usr/lib/python2.5/site-packages/jarabe/util/zdepend.py", line 49, in fetch
       downloaded = policy.download_uncached_implementations()
     File "/usr/lib/python2.5/site-packages/zeroinstall/injector/policy.py", line 393, in download_uncached_implementations
       assert self.solver.ready, "Solver is not ready!\n%s" % self.solver.selections
   AssertionError: Solver is not ready!
   {<Interface http://rox.sourceforge.net/2005/interfaces/ROX-Lib>: None, <Interface /home/sugar/Activities/Terminal.activity/activity/0depend.xml>: v1 (/home/sugar/Activities/Terminal.activity/activity)}

The problem seems to be that you haven't told the policy object to solve the
feeds. You can do that with 


and maybe in other ways too.

Anyway, after teaching zdepend.py to solve the policy, I ran into into further
trouble because my zeroinstall trust-db doesn't contain the ROX keys.

To deal with this, I think you need to construct the policy object with a
Handler object


and override its confirm_keys method.

@Thomas, Rene: is this about right?


More information about the Sugar-devel mailing list