From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 562611382C5 for ; Mon, 4 Jan 2021 23:45:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A64EE0921; Mon, 4 Jan 2021 23:45:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B0D10E08A8 for ; Mon, 4 Jan 2021 23:45:50 +0000 (UTC) Received: by mail-il1-f178.google.com with SMTP id k8so26980511ilr.4 for ; Mon, 04 Jan 2021 15:45:49 -0800 (PST) X-Gm-Message-State: AOAM530aIJkSfi2vf0fiM0t/AmWBbiZnUWpcng8+eNq7U3PoFQej06/l nFHK5e9qeeisgwn/fyuNOfi3VUBwihOdMNkbq+E= X-Google-Smtp-Source: ABdhPJyWhjJyqe7NavrAfWa6Uq6G6Dh3/aDuUOeEbgOhe5pUWZ50ufGxnuTFuP+Lik7QT2lN8Wjg/xohg+fFVyESgNQ= X-Received: by 2002:a05:6e02:f93:: with SMTP id v19mr71949124ilo.154.1609803947532; Mon, 04 Jan 2021 15:45:47 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <20210103010904.1158863-1-floppym@gentoo.org> <20210103125208.0694a788@symphony.aura-online.co.uk> <20210104231826.3781d650@symphony.aura-online.co.uk> In-Reply-To: <20210104231826.3781d650@symphony.aura-online.co.uk> From: Mike Gilbert Date: Mon, 4 Jan 2021 18:45:36 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-dev] [PATCH] systemd.eclass: remove SYSROOT from pkg-config output To: Gentoo Dev Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 5ddc55eb-3f44-488e-a006-07fb2070be54 X-Archives-Hash: ae1a04eb1034675165ccebf65e090fc4 On Mon, Jan 4, 2021 at 6:18 PM James Le Cuirot wrote: > $ PKG_CONFIG_SYSROOT_DIR=/foo pkg-config --variable=udevdir udev > /lib/udev > > The udevdir variable is not affected by PKG_CONFIG_SYSROOT_DIR at all. > And why would it be? The man page says that this variable is only > applied to -I and -L flags. I don't know for sure but I suspect that > pkg-config just sees this as some arbitrary variable with no special > path handling at all. I wonder what led you to think that this fix was > necessary? Interesting! pkg-config behaves differently on my system: % PKG_CONFIG_SYSROOT_DIR=/foo pkg-config --variable=udevdir udev /foo/lib/udev This appears to be a difference in behavior between dev-util/pkgconfig and dev-util/pkgconf. I am using pkgconf, and I would guess you are using pkgconfig. I guess I will ask pkgconf upstream for help on this; it seems like this is probably an unintended behavior. > One last question. Why is this dynamic at all? Shouldn't it just be > hardcoded to /lib/udev? Sure, a user could patch udev to make it > something different if they really wanted but there are plenty of other > paths we just assume. What makes this one special? sys-apps/systemd has a USE flag called "split-usr". This is meant to allow users to perform a /usr merge if desired. When split-usr is disabled, udevdir becomes /usr/lib/udev instead of /lib/udev.