This repo is a minimal setup to reproduce a potential pitfall (or even a bug) when using package_type = "application"
packages in a host context.
The setup is:
mock-gcc
definesself.buildenv_info.define("CC", "mock-gcc")
etc. in itspackage_info
method and exports some runtime libraries.package-a
usesmock-gcc
in both the build context (for the compiler) and host context (to create a dependency on the runtime libs) to build a library.package-b
usespackage-a
as a library dependency to build an executable.
The expected result is for the runtime libraries in mock-gcc
to become a transitive dependency for package-b
and nothing more.
However, when mock-gcc
is used without run=False
in self.requires()
in package-a
, the buildenv environment variables
get propagated into package-b
's buildenv as well, which is not at all expected.
To reproduce this run:
./test.sh
Expected result in package-b
:
CC=
CXX=
FC=
Actual result:
CC=mock-gcc
CXX=mock-gcc
FC=mock-gcc