[Sugar-devel] [Zero-install-devel] 0depend feature request
Aleksey Lim
alsroot at member.fsf.org
Tue Nov 24 18:20:39 EST 2009
On Tue, Nov 24, 2009 at 10:20:27PM +0000, Thomas Leonard wrote:
> 2009/11/24 Michael Stone <michael at laptop.org>:
> > 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:
> >
> > 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.
>
> That's right:
>
> - need_download() will do a solve and return True if you're missing
> feeds or implementations
> - solve_with_downloads() will solve and download any extra feeds it
> needs repeatedly until it has all the information it needs
> - solve_and_download_impls() will additionally download the selected
> implementations afterwards
I've just tried simple example[1] with simple feed[2] in system w/o
any 0install remains and it fails for the first time[3] but runs ok for 2nd.
I missed something in example code or its a unpredictable behaviour
(since [3] cailms for missed ROX-Lib dependensy but
solve_and_download_impls() should make all downloads)?
[1] http://pastebin.be/22131
[2] http://pastebin.be/22132
[3] http://pastebin.be/22133
--
Aleksey
More information about the Sugar-devel
mailing list