1 |
On Mon, Jan 4, 2021 at 6:18 PM James Le Cuirot <chewi@g.o> wrote: |
2 |
> $ PKG_CONFIG_SYSROOT_DIR=/foo pkg-config --variable=udevdir udev |
3 |
> /lib/udev |
4 |
> |
5 |
> The udevdir variable is not affected by PKG_CONFIG_SYSROOT_DIR at all. |
6 |
> And why would it be? The man page says that this variable is only |
7 |
> applied to -I and -L flags. I don't know for sure but I suspect that |
8 |
> pkg-config just sees this as some arbitrary variable with no special |
9 |
> path handling at all. I wonder what led you to think that this fix was |
10 |
> necessary? |
11 |
|
12 |
Interesting! |
13 |
|
14 |
pkg-config behaves differently on my system: |
15 |
|
16 |
% PKG_CONFIG_SYSROOT_DIR=/foo pkg-config --variable=udevdir udev |
17 |
/foo/lib/udev |
18 |
|
19 |
This appears to be a difference in behavior between dev-util/pkgconfig |
20 |
and dev-util/pkgconf. I am using pkgconf, and I would guess you are |
21 |
using pkgconfig. |
22 |
|
23 |
I guess I will ask pkgconf upstream for help on this; it seems like |
24 |
this is probably an unintended behavior. |
25 |
|
26 |
> One last question. Why is this dynamic at all? Shouldn't it just be |
27 |
> hardcoded to /lib/udev? Sure, a user could patch udev to make it |
28 |
> something different if they really wanted but there are plenty of other |
29 |
> paths we just assume. What makes this one special? |
30 |
|
31 |
sys-apps/systemd has a USE flag called "split-usr". This is meant to |
32 |
allow users to perform a /usr merge if desired. When split-usr is |
33 |
disabled, udevdir becomes /usr/lib/udev instead of /lib/udev. |