Mailinglist Archive: yast-devel (66 mails)

< Previous Next >
Re: [yast-devel] Ruby code in SCR
On Wed, 19 Jun 2013 16:49:46 +0200
Lukas Ocilka <lukas.ocilka@xxxxxxxx> wrote:

Hi,

As I've been implementing new module written in Ruby only
(https://github.com/kobliha/yast-services-manager), I've found out I
actually can't use many generic libraries because they access the
system directly omitting SCR.

SCR is a layer that basically allows us to read and write
configuration and call commands independently on the fact whether it
is bound to current or chrooted system. SCR has the knowledge about
the current target built-inside and it can switch targets on-the-fly.
This is especially needed for installation. There are some
want-to-haves:

- Installed system as small as possible (no YaST installed at all)
- Using as much upstream (Ruby) libraries as possible
- We must not take care about the target path itself, that can be set
or changed by installer almost anywhere

Do you have any idea how we could achieve that with the new YaST? I'd
like to have something like:

SCR.Run do
<ruby code>
end

Any ideas how to implement this?

Thanks in advance
Lukas


Well, actually it is already solved. For any external library or any
code that needs touch of system use module that wraps library. See
perl-bootloader that do system touch and its wrapper[1] that is called
via System namespace, that do all necessary switching [2].

I plan to document how to use System namespace in documentation after
we switch to ruby ( even if this concept exists even before).

Josef

[1]
https://github.com/yast/yast-bootloader/blob/master/src/modules/Bootloader_API.pm
[2]
https://github.com/yast/yast-bootloader/blob/master/src/routines/lib_iface.ycp
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
References