[yast-devel] WFM and other languages
Hi, as part of my improvements to ruby bindings and ruby usability for YaST I create script for starting clients code. But clients code can be run also via WFM and it is problem. Now it is hardcoded there, that it must be ycp - https://github.com/yast/yast-core/blob/master/wfm/src/Y2CCWFM.cc#L65 I think it would be nice to change it and it is also required if we want to have complete module in ruby that play nice with ycp modules. My idea is to search also for other suffixes ( now if I know only ruby can call clients, but maybe in future other bindings want to use it also ) and call directly ruby component to call its client that is passed. For this goal it would be nice to enhance PathSearch to detect on its own suffixes, so it can be on one place and not have everywhere try for various suffixes. Also there is one more problem in yast2 script. It pass only client name without suffix, so it is hard to decide in script itself if client is ruby or ycp. Is there any way how to detect it in yast script? Or how to use PathSearch from shell ( of course with passed '-I' parameters ) Thanks for answer Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Dne 4.2.2013 15:17, Josef Reidinger napsal(a):
Hi, [...] Also there is one more problem in yast2 script. It pass only client name without suffix, so it is hard to decide in script itself if client is ruby or ycp. Is there any way how to detect it in yast script?
Is that needed actually? I think it should be similar to Yast modules, in YCP you write import "Module"; and do not care if it is an YCP/Perl/Ruby/Python module. The import call tries ycp/ybc and if not found then asks all language bindings to import it. The first one which succeeds is loaded into that name space. For clients it should be similar, i.e. WFM::Call("client") should look for client.ycp and then should try other bindings (suffixes) if not found. BTW if we want to switch to Ruby do we want to actually support non-Ruby clients? If we would be able to do the switch at once, then we do not need to take care of non-Ruby clients... -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (2)
-
Josef Reidinger
-
Ladislav Slezak