Tools: don't add the esptool directory with wrappers to the PATH

Esptool.py is available from the esptool package which is installed in
every ESP-IDF v5.0+ shells. Therefore, the path to the legacy wrapper
scripts is not needed to be in the PATH. In some cases like
https://github.com/espressif/esp-idf/issues/10926 it even cases problem
because the wrapper doesn't have a shebang line and is not executable.

Note that the wrapper is kept only for invoking esptool as "python
$IDF_PATH/..../esptool.py" which was previously used mostly in CMake
files. There should be no other use-case where the esptool wrappers are
still needed.
This commit is contained in:
Roland Dobai 2023-03-21 16:01:56 +01:00
parent f3de7e574d
commit 7473fd3f0f
3 changed files with 1 additions and 4 deletions

View File

@ -37,7 +37,6 @@ function __main
set -gx IDF_TOOLS_INSTALL_CMD "$IDF_PATH"/install.fish set -gx IDF_TOOLS_INSTALL_CMD "$IDF_PATH"/install.fish
# Allow calling some IDF python tools without specifying the full path # Allow calling some IDF python tools without specifying the full path
# "$IDF_PATH"/tools is already added by 'idf_tools.py export' # "$IDF_PATH"/tools is already added by 'idf_tools.py export'
set IDF_ADD_PATHS_EXTRAS "$IDF_PATH"/components/esptool_py/esptool
set IDF_ADD_PATHS_EXTRAS "$IDF_ADD_PATHS_EXTRAS":"$IDF_PATH"/components/espcoredump set IDF_ADD_PATHS_EXTRAS "$IDF_ADD_PATHS_EXTRAS":"$IDF_PATH"/components/espcoredump
set IDF_ADD_PATHS_EXTRAS "$IDF_ADD_PATHS_EXTRAS":"$IDF_PATH"/components/partition_table set IDF_ADD_PATHS_EXTRAS "$IDF_ADD_PATHS_EXTRAS":"$IDF_PATH"/components/partition_table
set IDF_ADD_PATHS_EXTRAS "$IDF_ADD_PATHS_EXTRAS":"$IDF_PATH"/components/app_update set IDF_ADD_PATHS_EXTRAS "$IDF_ADD_PATHS_EXTRAS":"$IDF_PATH"/components/app_update

View File

@ -52,8 +52,7 @@ foreach ($pair in $envars_array) {
# Allow calling some IDF python tools without specifying the full path # Allow calling some IDF python tools without specifying the full path
# ${IDF_PATH}/tools is already added by 'idf_tools.py export' # ${IDF_PATH}/tools is already added by 'idf_tools.py export'
$IDF_ADD_PATHS_EXTRAS = [IO.Path]::Combine(${IDF_PATH}, "components", "esptool_py", "esptool") $IDF_ADD_PATHS_EXTRAS = ${S} + [IO.Path]::Combine(${IDF_PATH}, "components", "app_update")
$IDF_ADD_PATHS_EXTRAS += ${S} + [IO.Path]::Combine(${IDF_PATH}, "components", "app_update")
$IDF_ADD_PATHS_EXTRAS += ${S} + [IO.Path]::Combine(${IDF_PATH}, "components", "espcoredump") $IDF_ADD_PATHS_EXTRAS += ${S} + [IO.Path]::Combine(${IDF_PATH}, "components", "espcoredump")
$IDF_ADD_PATHS_EXTRAS += ${S} + [IO.Path]::Combine(${IDF_PATH}, "components", "partition_table") $IDF_ADD_PATHS_EXTRAS += ${S} + [IO.Path]::Combine(${IDF_PATH}, "components", "partition_table")
$env:PATH = $IDF_ADD_PATHS_EXTRAS + $S + $env:PATH $env:PATH = $IDF_ADD_PATHS_EXTRAS + $S + $env:PATH

View File

@ -125,7 +125,6 @@ __main() {
export IDF_TOOLS_INSTALL_CMD=${IDF_PATH}/install.sh export IDF_TOOLS_INSTALL_CMD=${IDF_PATH}/install.sh
# Allow calling some IDF python tools without specifying the full path # Allow calling some IDF python tools without specifying the full path
# ${IDF_PATH}/tools is already added by 'idf_tools.py export' # ${IDF_PATH}/tools is already added by 'idf_tools.py export'
IDF_ADD_PATHS_EXTRAS="${IDF_PATH}/components/esptool_py/esptool"
IDF_ADD_PATHS_EXTRAS="${IDF_ADD_PATHS_EXTRAS}:${IDF_PATH}/components/espcoredump" IDF_ADD_PATHS_EXTRAS="${IDF_ADD_PATHS_EXTRAS}:${IDF_PATH}/components/espcoredump"
IDF_ADD_PATHS_EXTRAS="${IDF_ADD_PATHS_EXTRAS}:${IDF_PATH}/components/partition_table" IDF_ADD_PATHS_EXTRAS="${IDF_ADD_PATHS_EXTRAS}:${IDF_PATH}/components/partition_table"
IDF_ADD_PATHS_EXTRAS="${IDF_ADD_PATHS_EXTRAS}:${IDF_PATH}/components/app_update" IDF_ADD_PATHS_EXTRAS="${IDF_ADD_PATHS_EXTRAS}:${IDF_PATH}/components/app_update"