Skip to contentSkip to conversation

correspondence between HOSTTOOLS and ASSUME_PROVIDED?

DISCUSSION Robert P. J. Day 1 participant 1 message May 3, 2020

lore
Share & tools
lore
#0 lore raw

(wanting to clarify the precise behaviour involving both HOSTTOOLS
and ASSUME_PROVIDED.)

just want to make sure this stuff is explained properly in the docs,
as it has the potential to be confusing.

first, in the current reference manual in the variables glossary,
one reads:

"HOSTTOOLS: A space-separated list (filter) of tools on the build host that should be allowed to be called from within build tasks..."

that seems a bit vague ... as i read it, it's not so much that those
native commands "*should* be allowed to be called" so much as it is that those are the native tools that *must* exist on the host and, furthermore, they are the ones that *will* be invoked even if the corresponding providing native recipe is built that provides the same command, is that right?

and, second, it seems that if one wants to play with those variables
(admittedly unusual), then one has to make sure they stay in sync in the following way.

HOSTTOOLS represents simply individual *commands* that have to be
natively available, while ASSUME_PROVIDED identifies entire native *recipes* that are being told not to build, which means that if a certain native recipe is not built, quite a number of native commands might suddenly be unavailable.

as a simple example, ASSUME_PROVIDED identifies "findutils-native"
as a recipe that should not be built. as it is, that recipe provides two native commands of interest: "find" and "xargs". so given that the build process really needs both of those commands, it is not surprising that both of those are listed in HOSTTOOLS, which requires them to exist natively.

now, if someone had neglected to mention "xargs" in HOSTTOOLS, as i
read it, a build would fail if xargs was invoked natively even if such a command existed on the build host. that is, once one identifies findutils-native to ASSUME_PROVIDED, then one is *required* to have the necessary commands on the build host, *and* list them in HOSTTOOLS so that they are found.

do i have this about right?

rday