Re: [Sugar-devel] [Zero-install-devel] 0depend feature request
2009/11/24 Aleksey Lim alsr...@member.fsf.org: [...] 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 An async task needs to be a Python generator, which means it needs to include a yield statement somewhere (even if it's never called). Normally key confirmation has to be async because it has to wait for the key information to arrive and it has to wait for the user to confirm. I'll update handler.py so that it doesn't need to be async, but meanwhile just putting yield at the end will fix the problem. -- Dr Thomas Leonard ROX desktop / Zero Install GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Zero-install-devel] 0depend feature request
On Wed, Nov 25, 2009 at 10:27:57AM +, Thomas Leonard wrote: 2009/11/24 Aleksey Lim alsr...@member.fsf.org: [...] 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 An async task needs to be a Python generator, which means it needs to include a yield statement somewhere (even if it's never called). Normally key confirmation has to be async because it has to wait for the key information to arrive and it has to wait for the user to confirm. I'll update handler.py so that it doesn't need to be async, but meanwhile just putting yield at the end will fix the problem. thanks, I added yield to confirm_import_feed() and it works fine -- Aleksey ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Zero-install-devel] 0depend feature request
On Tue, Nov 24, 2009 at 10:20:27PM +, Thomas Leonard wrote: 2009/11/24 Michael Stone mich...@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 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel