espressif / idf-installer

ESP IDF Windows Installer
https://dl.espressif.com/dl/esp-idf/
102 stars 21 forks source link

Offline installation 2.12 of ESP-IDF 4.2.2 fails if github is not reachable #92

Closed georgik closed 2 years ago

georgik commented 2 years ago

The Offline installer 2.12 fails to deploy ESP-IDF 4.2.2. Command:

C:\Users\User\.espressif\tools\idf-git\2.30.1\cmd\git.exe -C C:\Users\User\Desktop\esp-idf submodule update --init --recursive

The failure occurs during checkout of submodules when github.com is not reachable:

Running command: C:\Users\User\.espressif\tools\idf-git\2.30.1\cmd\git.exe -C C:\Users\User\Desktop\esp-idf submodule update --init --recursive
                          Submodule path 'components/asio/asio': checked out '3b66e5b051381fb70de9c2791df70a06181c64e3
                          Submodule path 'components/bootloader/subproject/components/micro-ecc/micro-ecc': checked out 'd037ec89546fad14b5c4d5456c2e23a71e554966
                          Submodule path 'components/bt/controller/lib': checked out '1f7e45e2f645f115fc4ca7fc35ecee2d894ff2ea
                          fatal: unable to access 'https://github.com/espressif/esp-nimble.git/': Could not resolve host: github.co
                          Unable to fetch in submodule path 'components/bt/host/nimble/nimble'; trying to directly fetch 57d751b93a5532e650ec3787d376876ab0ce367e
                          fatal: unable to access 'https://github.com/espressif/esp-nimble.git/': Could not resolve host: github.co
                          Fetched
georgik commented 2 years ago

The problem is caused by submodules where a directory exists in one tag, but does not exist in the other. Following command fails in completely offline environment git submodule update --init --recursive. Example of the result in the online environment.

From https://github.com/espressif/esp-nimble
 * branch              57d751b93a5532e650ec3787d376876ab0ce367e -> FETCH_HEAD

So the only option for a complete offline environment is to have ESP-IDF branch pre-checkouted and archived for specific version.

georgik commented 2 years ago

Creating single branch installer is about 900 MB per each.

georgik commented 2 years ago

Multiple branch Offline installer is not feasible:

Decision to change the way how Offline Installer operates:

The change does not affect Online Installer which serves as multi-branch installer.

georgik commented 2 years ago

Solved by Single Branch Offline installers: https://github.com/espressif/idf-installer#single-esp-idf-branch-offline-installer