Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 873172 - systemd.eclass: request for systemd_get_systemsleepdir function
Summary: systemd.eclass: request for systemd_get_systemsleepdir function
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-09-27 12:33 UTC by Ionen Wolkens
Modified: 2022-10-15 20:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ionen Wolkens gentoo-dev 2022-09-27 12:33:07 UTC
Want to un-hardcode this from nvidia-drivers:

    exeinto /lib/systemd/system-sleep
    doexe systemd/system-sleep/nvidia

Would rather not assume /lib (even if it still works with /lib -> /usr/lib symlink) nor the system-sleep directory name (technically need it unprefixed too unless get a systemd_dosystemsleep or so, but I'm fine doing ${var#"${EPREFIX}"}).

If feel it's not worth adding, guess could use pkg-config myself and fallback to $(systemd_get_utildir)/system-sleep if failed.

Note pkg-config variable includes a "d" unlike the others, unsure what will prefer the function to be named (get_systemdsleepdir to match the variable, or get_systemsleepdir to match e.g. get_systempresetdir), not that I mind either way.

    $ pkgconf --variable=systemdsleepdir systemd
    /lib/systemd/system-sleep
Comment 1 Larry the Git Cow gentoo-dev 2022-10-15 17:35:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=456501e78c64d3d76d8c9a404c68a13d352acb21

commit 456501e78c64d3d76d8c9a404c68a13d352acb21
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2022-10-09 20:22:38 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-10-15 17:33:49 +0000

    systemd.eclass: add systemd_get_sleepdir
    
    Closes: https://bugs.gentoo.org/873172
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 eclass/systemd.eclass | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2022-10-15 20:07:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0fd6848a653bc6032b9281ad247e1f97b3bb171

commit b0fd6848a653bc6032b9281ad247e1f97b3bb171
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-10-15 17:56:09 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-10-15 20:06:46 +0000

    x11-drivers/nvidia-drivers: use the new systemd_get_sleepdir
    
    Bug: https://bugs.gentoo.org/873172
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild | 3 ++-
 x11-drivers/nvidia-drivers/nvidia-drivers-510.85.02.ebuild  | 3 ++-
 x11-drivers/nvidia-drivers/nvidia-drivers-515.49.19.ebuild  | 3 ++-
 x11-drivers/nvidia-drivers/nvidia-drivers-515.65.01.ebuild  | 3 ++-
 x11-drivers/nvidia-drivers/nvidia-drivers-520.56.06.ebuild  | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)