Both sys-apps/systemd-tmpfiles-{246,248.3}.ebuild pull in linux-headers as a *runtime* dependency? Is this really correct? Can it be moved to BDEPEND please? DEPEND=" sys-apps/acl:0= >=sys-apps/util-linux-2.30:0= >=sys-kernel/linux-headers-${MINKV} sys-libs/libcap:0= selinux? ( sys-libs/libselinux:0= ) " RDEPEND="${DEPEND} !sys-apps/opentmpfiles !sys-apps/systemd " Note, building embedded small systems user here. Thanks
It should be in DEPEND, not BDEPEND.
Thankyou for responding. Could I ask for a few more minutes of your time to educate me here please? I guess I have 2 questions: 1) Do we have a runtime requirement to have these headers available? (I've only just hit this upgrading from a previous tmpfiles option, so I've not needed kernel headers for this fairly substantial installation previously) 2) If we don't need the headers to be deployed, then what is the correct way to explain this to the build system? I apparently don't understand the documentation correctly, a pointer would be helpful? My understanding was that the RDEPEND would be used for the runtime dep and BDEPEND for build time depends (this leaves me unclear how DEPEND is now used actually?) The upshot is that this is definitely pulling things into my chroot (ROOT=/blah emerge opentmpfiles), and to my eye it doesn't need to do this? Thanks for a gentle education...
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fd5e624ae1c24b83d6093ca876f39fa567e872c commit 3fd5e624ae1c24b83d6093ca876f39fa567e872c Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2021-07-13 18:47:08 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2021-07-13 18:52:36 +0000 sys-apps/systemd-tmpfiles: move linux-headers to DEPEND no revbump, since it generally affects only new/cross installs Closes: https://bugs.gentoo.org/802015 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild | 10 ++++++---- sys-apps/systemd-tmpfiles/systemd-tmpfiles-248.3.ebuild | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-)
RDEPEND - needed at runtime. so you are correct here. BDEPEND - needed at build time at BROOT, build root. DEPEND - needed at build time on ROOT, host root. host as in autotools host. the system that hosts resulting binaries. but note, DEPEND deps can be deleted later with no runtime effect. that's the difference between DEPEND and RDEPEND. BDEPEND will not be pulled into chroot/ROOT at all.
(In reply to Ed Wildgoose from comment #2) > 1) Do we have a runtime requirement to have these headers available? (I've > only just hit this upgrading from a previous tmpfiles option, so I've not > needed kernel headers for this fairly substantial installation previously) There is no runtime requirement. Including it in RDEPEND was a mistake. > 2) If we don't need the headers to be deployed, then what is the correct way > to explain this to the build system? I apparently don't understand the > documentation correctly, a pointer would be helpful? My understanding was > that the RDEPEND would be used for the runtime dep and BDEPEND for build > time depends (this leaves me unclear how DEPEND is now used actually?) The difference between BDEPEND and DEPEND is explained here: https://devmanual.gentoo.org/general-concepts/dependencies/index.html#build-dependencies
so after this change you may be able to remove linux-headers and other DEPEND stuff from chroot via emerge --with-bdeps=n -cp but it may expose more packages specifying incorrect deps, use with care.
> The upshot is that this is definitely pulling things into my chroot (ROOT=/blah emerge opentmpfiles), and to my eye it doesn't need to do this? For your specific example, it's probably redundant. However, when cross-compiling, ROOT might contain libraries and headers for a completely different CPU architecture. System headers (*.h) sometimes vary depending on the CPU being targeted. This is especially true of the linux-headers package.