[Bug 705422] New: ruby-bindings: ruby module must be present in YCP moduledir

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c0 Summary: ruby-bindings: ruby module must be present in YCP moduledir Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: dmacvicar@novell.com ReportedBy: jsuchome@novell.com QAContact: jsrain@novell.com Found By: Development Blocker: --- I did not test if there's some way, but I guess currently it is not. Is it possible to import ruby module into ycp, that is located elsewhere than under /usr/share/YaST2/modules ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c1 Jiří Suchomel <jsuchome@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jreidinger@suse.com, | |kkaempf@suse.com, | |mvidner@suse.com --- Comment #1 from Jiří Suchomel <jsuchome@suse.com> 2011-09-07 08:25:44 UTC --- Is there a chance this could be fixed somehow? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c2 Klaus Kämpf <kkaempf@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |jsuchome@suse.com --- Comment #2 from Klaus Kämpf <kkaempf@suse.com> 2011-09-07 08:33:52 UTC --- The search path serves as a kind of 'namespace' prefix to prevent clashes of yast-ruby modules with other ruby plugins. yast2-core used to have a "-M" option (similar to -I of C compilers) to specify load pathes for modules. Would that fix this issue ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c3 Jiří Suchomel <jsuchome@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|jsuchome@suse.com | --- Comment #3 from Jiří Suchomel <jsuchome@suse.com> 2011-09-07 08:46:19 UTC --- (In reply to comment #2)
The search path serves as a kind of 'namespace' prefix to prevent clashes of yast-ruby modules with other ruby plugins. yast2-core used to have a "-M" option (similar to -I of C compilers) to specify load pathes for modules. Would that fix this issue ?
I doubt, because the ruby modules need to be available from ycp clients as well. Ideally, I'd expect that ruby module installed at ruby_vendor_dir y_lib/kerberos_client.rb would be available in YaST as import "YLib/kerberos_client" or (with some automatic lower/upper case magic) import "YLib/KerberosClient" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c4 --- Comment #4 from Josef Reidinger <jreidinger@suse.com> 2011-09-07 09:05:01 UTC --- I think that we should make available easy ruby code from ycp, so create new command or use specific prefix for code in ruby load path. so e.g. import_ruby "YLib/KerberosClient" //or more ruby like import_ruby "y_lib/kerberos_client" or with prefix import "ruby/YLib/KerberosClient" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c5 --- Comment #5 from Klaus Kämpf <kkaempf@suse.com> 2011-09-07 09:11:18 UTC --- Hmm, this would defeat the design purpose (is it still valid?) of having ycp/ruby transparently side-by-side. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c6 --- Comment #6 from Duncan Mac-Vicar <dmacvicar@suse.com> 2011-09-07 09:25:13 UTC --- Most ruby libraries does not offer the kind of API YCP expects for its modules just like YaPI perl modules are not the typical perl module. So a typical .rb file is not useful for YaST. It has to be a file with a module containing module methods. Therefore ruby code that is going to be available to other ruby code has to be shipped in gems, like usual. IMHO the module that is importable from YCP should be a separate .rb file located in /usr/share/YaST/modules requiring the gem and exposing it with a module. This may be even a separate package. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c7 --- Comment #7 from Jiří Suchomel <jsuchome@suse.com> 2011-09-07 09:35:30 UTC --- (In reply to comment #6)
Most ruby libraries does not offer the kind of API YCP expects for its modules just like YaPI perl modules are not the typical perl module.
So a typical .rb file is not useful for YaST. It has to be a file with a module containing module methods.
Right for typical files, but could we have extra solution for those rb files written for YaST++ project? Currently we expect them to be located in ruby_vendor_dir/y_lib/kerberos_client.rb so maybe a import "YLib/KerberosClient" could be able to handle it because of YLib prefix? Yes, other way is to install something (envelope or just symlimk) into /usr/share/YaST/modules/YLib, but it would be nicer if we should not have to care about it at least in case of these special ruby modules. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c8 Duncan Mac-Vicar <dmacvicar@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|dmacvicar@suse.com |jreidinger@suse.com --- Comment #8 from Duncan Mac-Vicar <dmacvicar@suse.com> 2011-12-20 15:02:19 UTC --- I don't have the bandwidth to fix this at the moment. Reassigning to some of the YaST++ developers. (Not to mention I don't like the y_lib solution...) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c9 Josef Reidinger <jreidinger@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low Status|NEW |ASSIGNED --- Comment #9 from Josef Reidinger <jreidinger@suse.com> 2012-01-16 14:57:59 UTC --- I think that this is not possible as we cannot load from generic ruby path, otherwise we face problem with redefinition of core ycp object with ruby ones. Specific solution for y_lib is possible, but I think we need at first decide if this is what we really want ( e.g. now we face problem with exceptions etc. ). Also we can easy workaround it via generated layer between YLib and ycp. So I let it live, but set low priority, as it is yast++ specific and we should decide if we really want it there. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=705422 https://bugzilla.novell.com/show_bug.cgi?id=705422#c10 Josef Reidinger <jreidinger@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |WONTFIX --- Comment #10 from Josef Reidinger <jreidinger@suse.com> 2012-02-09 12:12:13 UTC --- current solution with one symlink to directory I find better then adding hack to ruby bindings. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com