Mailinglist Archive: yast-devel (66 mails)

< Previous Next >
Re: [yast-devel] Ruby code in SCR


On Jun 21 10:40 Josef Reidinger wrote (excerpt):
It would be nice to have a lot of NIH
modules or simple wrapper around "rest of the World" libraries. ( for
me the perfect state is when there is configuration libraries from
third party and we only have layer over it in YaST that coordinates
relations between components and show GUI ).

Basically this is how the YaST printer module works.

It is more or less a wrapper around CUPS' own configuration tools
that provides a GUI so that unexperienced users can call
CUPS' own configuration tools in the right way.

The difference is that CUPS' own configuration tools are no libraries
but command line tools - mainly lpinfo and lpadmin, see
"How to set up a print queue in full compliance with CUPS" at

I could have used the CUPS library libcups and re-implement what
lpinfo and lpadmin do but why should I bother with low-level stuff
when I have ready-to-use high-level configuration tools?

How I use SCR in the YaST printer module is only by calling
SCR::Execute( .target.bash_output, "commandline" )

Usually I have bash scripts that call CUPS' own configuration tools
and I call those bash scripts via SCR::Execute.

I need bash scripts as wrapper around CUPS' own configuration tools
for good error handling and in particular to enforce an exit after
a timeout so that the SCR::Execute call cannot hang up and for
special features like a progress indicator, see for example

I never understood how SCR knows that my bash scripts need to be
installed on the target system so that when the YaST printer module GUI
runs on another system it can run my bash scripts on the target system.
But as there is not any bug report I assume it somehow works magically.

Kind Regards
Johannes Meixner
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >