I guess it depends on how user programs are currently using the systemd
version API to check things. KDE PowerDevil strips everything before the
space and just compares against the number, so in principle, the shim
could use the prefix string to say something. I don't know how others
use the API.

KDE PowerDevil usage is here:
https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/master/entry/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp#L40

A cleaner approach to handling this would be an API for advertising
implemented features so programs aren't checking the version to see if
something is supported. Instead, they check if a feature they require is
supported. It's the best way if you're just going to implement part of
systemd, but you'd have to convince upstream to implement such an API.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1196752

Title:
  Suspend only works once when using upower with logind -- s-shim needs
  to call /lib/systemd/system-sleep/*

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1196752/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to