yast2-core
liby2 Library

The YaST2 component architecture

The YaST2 system consists of different components. These are user interfaces, modules, the system configuration repository (scr), the generic workflow manager (wfm), the scr agents and possibly other types.

Each of the components can be realized in different ways, for example as independent Unix executables, as processes communicating over a fixed socket, as shared library plugins, as statically linked object files or as YCP scripts.

The Y2 library provides a framework for unifying all these kinds of component types into a single interface called Y2Component. It also provides a generic frontend containing a main function, and the class Y2ComponentBroker, whose task is to create the interfaces to components when needed.

It is possible to link all YaST2 components together to one big monolith and even statically link that! The components can communicate by exchanging pointers to data structures rather that having to parse ASCII strings. And just one process is needed. On the other hand it is possible to split it up into many self contained binaries and it nevertheless has the same functionality. You very well can do it in both ways the same time and provide single isolated binaries as well as clusters of components, that need not be disjunct.

The generic frontend (y2base)

The liby2 provides a main function. A component linked to liby2 therefore need not and cannot have its own main function. This generic main function does:

A YaST2 binary does always consist of the generic frontend and zero or more components that are linked in. The binary y2base just contains the frontend and the builtin components cat and stdio. cat is a server component that can be used instead of a user interface. It simply prints all commands it gets to stdout and waits for the answer at stdin. stdio works similary, but is a client.

The general synopsis of a call of a YaST2 binary is:

y2base client server [client-options] [server-options]

<font size="-1">( Please don't ask yet, why the server-options are stated after the client options. We will see later. )</font>

An example would be:

y2base menu qt

This call would use the component qt, which is the Qt-lib base graphical user interface, as display server and start the module menu.

Server options

Every command line argument


Generated on a sunny day for yast2-core by doxygen 1.8.11