Mailinglist Archive: yast-devel (177 mails)

< Previous Next >
Re: [yast-devel] Features of the YCP successor


On Feb 2 11:14 Klaus Kaempf wrote:
Actually, the underlying implementation language shouldn't matter too
much to a developer using a future YaST infrastructure.

I would strongly suggest to look into the concept of domain specific
languages and focus on systems managemen functionality instead of
language specifics.

The key is to use concepts a systems administrator is familiar with.

To give you an example, lets assume we want to add a new harddisk as
/abuild. The code could look like this

# create a new 'handle' to manage the disk
disk = "/dev/..."

# defaults to use the whole disk with ext4

# alternative
# disk.create_partition :filesystem => :btrfs

disk.label = "Abuild"

# create a 'mountpoint' object
# 'system' is a global object representing the target
mountpoint = system.mkdir "/abuild"

# mount first disk partition, associates mountpoint object with partition
mountpoint.mount disk.partitions.first

# create fstab entry, mountpoint has all required information
system.fstab.add mountpoint

Those of you with Ruby knowledge will see the similarities ;-) And
thats for a reason since Ruby is ideally suited to implement domain
specific languages.

On first glance it seems you like to replace the YaST specific language YCP with another YaST specific language (which could
be now implemented in Ruby).

could you describe in more detail what you actually mean?

Perhaps you meant something like what I would like to have:

I do not care about the language.

I do care about the ready to use set of functions (or classes
or whatever such stuff is called in the particular language)
which are provided by the YaST development environment
so that I could implement my particular YaST modules easily.

When I learned YCP I was searching for its built-in functions
to change the system (e.g. change config files and so on).
But I found out that there are no such functions in YCP.
On the one hand YCP is THE language to implement YaST modules
but on the other hand YCP does not provide functions to change
the system. Basically YCP is only about the user interface!
Then I learned about this other stuff how to change the system.

I do not care very much about how to implement the UI
because I do not need sophisticated UI functionality.

I would be more interested how to change the system.
I would like an easy to use framework to change the system
(and not an obscure ini agent which destroyed config files).

Kind Regards
Johannes Meixner
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
This Thread
Follow Ups