On Wed, 24 Apr 2013 00:37:31 -0300 Cristian Rodríguez <crrodriguez@opensuse.org> wrote:
Hi:
Hi Christian,
I just subscribed to this list in order to offer assistance in order to get Yast and systemd to interact in a nicer fashion.
Thanks for your offer.
I will assist you with patches and a lot of suggestions after the decision of converting the YCP codebase into Ruby is taken and modules are translated.
Well, *unofficial* plan is to finish it for next opensuse release. Now we work on improve automatic convertor to produce code in same quality as it is before and to improve readability of code.
Here is the first and most important suggestion I have and I strongly suggest you to consider it while creating/migrating modules from YCP to Ruby.
- You MUST NOT talk (I can't find a way to emphasize this) to any systemd component using systemctl, localectl, timedatectl or whatever other command line utility, those are *human interfaces* and not *programming interfaces*(exception "systemctl show") if you continue in the current direction, it will bite you and rip and piece of your skin pretty soon. Yast MUST communicate with systemd components using the respective D-BUS API.[1][2][3][4]
Well, we know dbus, there is also dbus-client yast module that allows easy communication with dbus and we use quite a lot ruby-dbus in webyast, so I think it is quite mature now. But I see one quite big disadvantage of D-Bus. It is different API that is not so easy for users to try it. If something goes wrong, we see in log that systemctl command fail and user can try to run it manually. With D-Bus it is not so easy even if there is some gui helpers for it like D-Feet or qdbusviewer. Using CLI is also for me more unix way, where is CLI and gui is build on top of it, so result is that CLI is central point which is well tested and GUI benefit from it. Josef
[1] http://www.freedesktop.org/wiki/Software/systemd/dbus [2] http://www.freedesktop.org/wiki/Software/systemd/timedated [3] http://www.freedesktop.org/wiki/Software/systemd/localed [4] http://www.freedesktop.org/wiki/Software/systemd/hostnamed
A little bit of googling shows that mvidner has a repo in github containing an implementation of ruby-dbus that will come handy for this purpose.
That's all for now :-)
Cheers!
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org