mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 00:04:06 -09:00
9b6804f5b8d345417cc489e62b5c00f38cd46ed1
Recent commitf0c7cb01a9(package/pkg-download: do not try to vendor _EXTRA_DOWNLOADS) got last-minute changes when applied, which changed the expected behaviour for packages that do not have a main download. Beforef0c7cb01a9, the dl-wrapper would not even be called for those packages, and the original patch that was sent also avoided downloading such packages, butf0c7cb01a9now causes the dl-wrapper to be called. It is however an accident that the dl-wrapper does not fail. Indeed, it is expected to fail if no download was successful; we pass no URI, so the dl-wrapper should have failed, as it basically does: download_and_check=0 for uri in "${uris[@]}"; do ... done if [ "${download_and_check}" -eq 0 ]; then exit 1 fi However, it does not even go that far... Even though there is no output file, we still pass the path to the package output directory as the output path. So, to avoid downloading files already present, the wrapper checks if the output file exists, and checks its hash: if [ -e "${output}" ]; then if support/download/check-hash ${quiet} "${hfile}" "${output}" ... exit 0 ... fi The output path does exist now, because we explicitly create it just before calling the wrapper, because that's where we also locate the lockfile. So it ends up trying to validate the hash of a directory, but it fails to, as there is indeed no hash file for that package. And a missing hash file is just a warning, not an error, which makes the download actually a success... So, this is currently working, and this is by pure luck. However, there is a potential issue: if a target package is a virtual package, but the host package is a real package, e.g. the same foo.mk does (or the other way around): HOST_FOO_VERSION = 1.2.3 HOST_FOO_SITE = http://example.net/ $(eval $(virtual-package)) $(eval $(host-generic-package)) If there is a hash file to validate the host download, then the current situation will cause a failure, because there would be a hash file, but no hash for the output path of the target variant, which would then be a hard-error. So, revert to the behaviour from beforef0c7cb01a9, where no download is attempted for a package without a source (really, without a main download, now). Signed-off-by: Yann E. MORIN <yann.morin@orange.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commitd95a6dac31) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
…
…
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches
Description
Languages
Makefile
62.5%
Python
19%
C
8.5%
Shell
6.1%
PHP
1.4%
Other
2.1%