Hi all,
it maybe a already solved, very trivial thing to do, but is there any
way in bitbake to prevent that a tool from the build host is executed
instead of the same tool (maybe) available via the sysroot-native?
In shell I would typically do (e.g.) something like this
python() { echo "Custom python used"; /path/to/my/custom/python $@ }
python -c ...
In bitbake this is somehow hard to catch, as tools are usually picked
from PATH, which is extended while executing a parsed recipe and
therefore involves the host way to much.
Really useful would be if one could define such a thing within a recipe like
HIDETOOL_python = "nativepython"
which then will be translated into
python() { nativepython $@ }
or something similar, in the resulting run scripts, so it doesn't matter
if any script sourced afterwards using some fixed shebang/assumption.
This would clearly minimize the effort of making sources work within
yocto, so one doesn't have to rely on multiple containers and CI to
catch all those host->build-conterminations.
One could surely inject it into the PATH-var, but what I want is to
"redirect" certain calls to any reasonable binary I can think off,
instead of relying on the PATH order.
I had this multiple times with python scripts being "shebanged" onto a
certain python version, although not really needed, which I currently
can only solve by modifying the sources.
Any thoughts, suggestions?
Regards
Konrad
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#48091): https://lists.yoctoproject.org/g/yocto/message/48091
Mute This Topic: https://lists.yoctoproject.org/mt/69990070/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-