[Sugar-devel] 0depend feature request
Aleksey Lim
alsroot at member.fsf.org
Tue Nov 24 21:51:42 EST 2009
On Tue, Nov 24, 2009 at 03:01:07PM -0500, Michael Stone wrote:
> 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
>
> Aleksey,
>
> I tried out your patches in a Debian Sid chroot with
>
> zeroinstall-injector-0.42.1-1
>
> installed and got the following exception in shell.log when running your test
> case:
>
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/jarabe/desktop/favoritesview.py", line 519, in __button_release_event_cb
> self._activate()
> File "/usr/lib/python2.5/site-packages/jarabe/desktop/favoritesview.py", line 531, in _activate
> self._resume(self._journal_entries[0])
> 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
>
> policy.solve_with_downloads()
>
> and maybe in other ways too.
yeah, in my testing environment I have remains from previous 0install
sessions
> 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
>
> http://0install.net/python-api/html/zeroinstall.injector.handler.Handler-class.html
>
> and override its confirm_keys method.
I've pushed new commits with fixed these issues and added cancel button
>
> @Thomas, Rene: is this about right?
>
> Michael
>
--
Aleksey
More information about the Sugar-devel
mailing list