-Dudevhwdbdir should be defined similar to how -Dudevrulesdir is. As is, the behavior of both variables is inconsistent. On my system, this is currently causing the rules to be installed in /usr/hwdb.d, as the `udev_dir` variable is missing from libudev.pc
Workaround that works when put in /etc/portage/env/sys-power/upower: pre_src_configure() { MYMESONARGS="-Dudevhwdbdir='$EPREFIX$(get_udevdir)/hwdb.d' $MYMESONARGS" }
This looks solved in 1.90.2 as upstream installs them under udev_dir by default: udevhwdbdir = get_option('udevhwdbdir') if udevhwdbdir == 'auto' udev_dep = dependency('udev', required: true) udevhwdbdir = udev_dep.get_variable(pkgconfig: 'udev_dir') / 'hwdb.d' endif
Not exactly, the udev_dir variable is missing from libudev.pc[1], so it just ends up empty. [1]: https://github.com/systemd/systemd/blob/main/src/libudev/libudev.pc.in
I get the file properly installed in /usr/lib/udev/hwdb.d/95-upower-hid.hwdb because we are setting udev_dir in the ebuild
It's grabbing udev_dir from pkg-config, not from the ebuild. I'm suggesting adding it to the ebuild for good measure, just like -Dudevrulesdir is (which has the same fallback when unset).
Turns out the bug is specific to eudev, though I'm not entirely sure how. I'll file it to upstream, though it'd still be good to have consistent behavior for both -Dudevrulesdir and -Dudevhwdbdir in this ebuild (either define both or define none).
Nevermind, it was fixed upstream in udev as well.
*eudev...
(In reply to Esteve Varela Colominas from comment #3) > Not exactly, the udev_dir variable is missing from libudev.pc[1], so it just > ends up empty. The variable comes from udev.pc, not libudev.pc. https://github.com/systemd/systemd/blob/v255/src/udev/udev.pc.in
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=359c32e4437f309b2050cc7fe9723fb2ebf04c00 commit 359c32e4437f309b2050cc7fe9723fb2ebf04c00 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2024-01-29 20:04:06 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2024-01-29 20:04:06 +0000 sys-power/upower: drop -Dudevrulesdir We depend on virtual/udev, which should ensure that udev.pc is available. Bug: https://bugs.gentoo.org/916677 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-power/upower/upower-0.99.20.ebuild | 3 +-- sys-power/upower/upower-1.90.2.ebuild | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
I see, thanks. I traced the issue back and apparently it was fixed a few years ago. I think I reported it when I still had 3.2.11, the last stable available in ::gentoo at the time, which is even older...