Mailinglist Archive: yast-devel (65 mails)

< Previous Next >
Re: [yast-devel] New ruby way to use extension in inst-sys
On 25.5.2015 11:01, Josef Reidinger wrote:
Hi,
I would like to point you to new functionality, when you need to use
extension in inst-sys.
I write new wrapper, that allow using block form for loading such
extension and doing automatic unloading after block.

Example of usage:

InstExtensionImage.with_extension("snapper") do
WFM.Execute(path(".local.bash"), "snapper magic")
end

I like the implementation. Simple, but powerful. Using the power of
begin/ensure/end:

https://github.com/yast/yast-yast2/blob/master/library/control/src/modules/InstExtensionImage.rb#L340-L361

This is something that we almost don't use, but there are a lot of
places where it would help, e.g., in some very long if/elsif/else commands.

Thanks!
Lukas

--

Lukas Ocilka, Systems Management (Yast) Team Leader
SLE Department, SUSE Linux
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
References