[systemd-devel] systemd version debus call changed

Timothée Ravier siosm99 at gmail.com
Thu Feb 27 17:21:14 PST 2014


On 26/02/2014 02:38, Lennart Poettering wrote:
> On Wed, 26.02.14 02:01, Jason A. Donenfeld (Jason at zx2c4.com) wrote:
>> Upstream KDE patch is here:
>> https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/7584a63924620bac3bd87277c11cdb8cdb5018b1/diff/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp?format=diff
> 
> Wow. Just wow. I am feeling tempted to just randomly change the version
> string exposed on the bus now, until they give that up. Whate else can I
> do than actually document that the string isn't stable?

> It is totally non-sensical to check for software versions the way KDE
> does it. We supply them with a call to check whether a certain operation
> is available (CanSuspend(), CanHibernate(), ...). They should just call
> that. It will tell them precisely whether the operation is not
> implemented in the code, or whether it is available on the hardware, and
> so on. But no, they decided to involve version checks...

It looks like they check both systemd version and CanSuspend(),
CanHibernate() results:
https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/master/entry/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp#L229

Could it be for compatibility with older systemd releases?

-- 
Timothée Ravier


More information about the systemd-devel mailing list