west
west copied to clipboard
manifest: don't use realpath for abspath; prefer PWD for west_top
This is enough to make "west list" and "west topdir" not resolve symbolic links in a number of cases, for instance this has been successfully tested with symbolic links in -fmacro-prefix-map=${WEST_TOPDIR}=WEST_TOPDIR as implemented in https://github.com/zephyrproject-rtos/zephyr/pull/19440
This is enough to avoid too many double dots in module names generated when ZEPHYR_BASE has symbolic links, e.g. from:
build/modules/stuff/CMakeFiles/......__zephyrproject__modules_etc
to:
build/modules/stuff/CMakeFiles/modules_etc
While successfully tested on very large sanitycheck samples and enough to make them reproducible, this will likely never support every single possible use of symbolic links. See one exception described in the code comments where "make" is invoked directly. However this makes no difference when not using symbolic links.
TODO: add a Linux test, skipped on Windows with https://docs.pytest.org/en/latest/skipping.html#skip-all-test-functions-of-a-class-or-module
Signed-off-by: Marc Herbert [email protected]
I know you're still working on this and that it's just a draft, so I assume there will be test cases once you're ready for this to get merged.
Yes, this is just an early and incomplete (but functional enough) draft. Thanks for providing feedback already anyway!
I have no time to work on this in the short or medium term, it's all yours if anyone wants to start from it.
Tempted to close as stale, but relates to https://github.com/zephyrproject-rtos/west/issues/419 so leaving open for now.