Bug 37809 - Port systemd-analyze to Vala
Summary: Port systemd-analyze to Vala
Status: RESOLVED WONTFIX
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 02:01 UTC by Quentin "Sardem FF7" Glidic
Modified: 2013-02-11 18:00 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
A little DBus interface name fix (1.01 KB, patch)
2011-06-01 02:04 UTC, Quentin "Sardem FF7" Glidic
Details | Splinter Review
Split systemd-interfaces from systemadm as a compile-time library (4.19 KB, patch)
2011-06-01 02:09 UTC, Quentin "Sardem FF7" Glidic
Details | Splinter Review
sytemd-analyze: Vala implementation (34.61 KB, patch)
2011-06-01 02:14 UTC, Quentin "Sardem FF7" Glidic
Details | Splinter Review

Description Quentin "Sardem FF7" Glidic 2011-06-01 02:01:48 UTC
systemd-analyze is pretty useful, but while all systemd handy tools are in C or Vala, it is in Python (and use dbus-python and pycairo).

Since it is pretty easy to port it to Vala (even without Genie), I though it is a good idea to get rid of the python/dbus-python/pycairo dependencies.
Comment 1 Quentin "Sardem FF7" Glidic 2011-06-01 02:04:30 UTC
Created attachment 47413 [details] [review]
A little DBus interface name fix

It's pretty weird that systemadm works whatever you use here
Comment 2 Quentin "Sardem FF7" Glidic 2011-06-01 02:09:34 UTC
Created attachment 47414 [details] [review]
Split systemd-interfaces from systemadm as a compile-time library

It fails to compile in a multi-jobs make, I couldn't find out why
Comment 3 Quentin "Sardem FF7" Glidic 2011-06-01 02:14:38 UTC
Created attachment 47415 [details] [review]
sytemd-analyze: Vala implementation

The python script is just renamed here

The 'time' and 'blame' actions work exactly the same way as in the python script

The 'plot' action is still buggy (it draws the red boxes only while the code is pretty the same as in the python version)
Comment 4 Quentin "Sardem FF7" Glidic 2011-06-01 02:15:27 UTC
A further step may be to get rid of the cairo code to write a clean minimal SVG (I would open a new bug then submit patches for this one too)
Comment 5 Javier Jardón 2012-05-11 22:41:49 UTC
Could this have a review? Currently python-glib depends on dbus-glib, wich is deprecated.
Comment 6 Quentin "Sardem FF7" Glidic 2012-05-12 02:53:33 UTC
Actually, they need a rebase since the Vala code moved to systemd-ui. Maybe should they move to systemd-ui too.
Comment 7 Lennart Poettering 2012-07-20 15:02:04 UTC
Hmm, we moved the Vala bits to systemd-ui. 

I'd be OK with converting systemd-analyze to pure C, but I am not sure it would be a good thing to readd the Vala dep to systemd proper...
Comment 8 Quentin "Sardem FF7" Glidic 2012-07-20 15:33:26 UTC
I’m ok with it. I may even submit it to systemd-ui if that’s (more) relevant.

Is GLib an acceptable dependency (using a configure switch maybe)?

I may write the SVG by hand, without using Cairo to avoid this dep.
Comment 9 Lennart Poettering 2012-07-20 22:07:32 UTC
(In reply to comment #8)
> I’m ok with it. I may even submit it to systemd-ui if that’s (more) relevant.

But it isn't really a UI app, is it? So I'd prefer to have it in C and in systemd proper, so that it is available everywhere, including all embedded devices.

> Is GLib an acceptable dependency (using a configure switch maybe)?

Well, I am not sure why you'd need that. We do have a lot of functionality, such as hashtables or linked lists and so on in systemd anyway. Of course, GlIb does cover a lot more ground, but I don't think you'd need that (i.e. no need for GObject, or for GMainloop or anything). 

So, I am not entirely against GLib, but I think it would be cool to save the dep here, and just use what we have anyway...

(though admitedly, using dbus with raw dbus is a lot less fun than with gdbus...)

> I may write the SVG by hand, without using Cairo to avoid this dep.

I'd keep the cairo dep, simply because this makes us independent of the output (for example, we could make this write PNG too, with a trivial patch). But that's up to you. Raw SVG is OK too.
Comment 10 Auke Kok 2013-02-11 17:58:28 UTC
A proposal has been made to port systemd-analyze to C. The progress is tracked in https://bugs.freedesktop.org/show_bug.cgi?id=60112, and will be merged shortly.

I therefore consider this bug closed (rejected) as we're moving ahead with the C implementation and rejecting the vala implementation.
Comment 11 Auke Kok 2013-02-11 18:00:04 UTC
We're moving ahead with the C implementation instead.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.