Go to file
Yann E. MORIN d95a6dac31 package/pkg-generic: explicitly do not download package withtout source
Recent commit f0c7cb01a9 (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.

Before f0c7cb01a9, the dl-wrapper would not even be called for those
packages, and the original patch that was sent also avoided downloading
such packages, but f0c7cb01a9 now 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 before f0c7cb01a9, 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>
2022-05-14 11:37:17 +02:00
arch arch/Config.in.arm: re-organize MMU selection 2022-04-24 10:49:58 +02:00
board configs/kontron_pitx_imx8m: switch to upstream U-Boot 2022-05-13 18:59:55 +02:00
boot boot/shim: big endian arm/aarch64 variants are not supported 2022-05-12 10:40:16 +02:00
configs configs/kontron_pitx_imx8m: switch to upstream U-Boot 2022-05-13 18:59:55 +02:00
docs docs/manual: document flit/pep517 python package infrastructure 2022-05-04 21:47:37 +02:00
fs fs/oci: depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS 2022-04-04 21:19:37 +02:00
linux linux: Fix powerpc64le defconfig selection 2022-05-13 23:54:14 +02:00
package package/pkg-generic: explicitly do not download package withtout source 2022-05-14 11:37:17 +02:00
support support/testing: test_lxc: bump kernel version to 5.15.38 for complete pidfds support 2022-05-13 21:08:30 +02:00
system package/systemd: add setting for systemd default.target 2022-05-02 22:58:44 +02:00
toolchain {toolchain, linux-headers}: add support for 5.17.x headers 2022-05-13 18:32:13 +02:00
utils utils/genrandconfig: add DTS cuimage fixup 2022-05-04 21:38:10 +02:00
.clang-format .clang-format: initial import from Linux 5.15.6 2022-01-01 15:01:13 +01:00
.defconfig
.flake8 Revert ".flake8: fix check for 80/132 columns" 2021-01-02 17:38:20 +01:00
.gitignore
.gitlab-ci.yml utils/checkpackagelib/lib_sysv: run shellcheck 2022-02-06 18:27:03 +01:00
CHANGES docs/website: update for 2022.02.1 2022-04-13 00:13:08 +02:00
Config.in support/download: Add SFTP support 2022-01-06 09:34:05 +01:00
Config.in.legacy package/linux-headers: drop 5.16.x option 2022-05-13 23:47:28 +02:00
COPYING
DEVELOPERS DEVELOPERS: Update entries for Neal Frager 2022-05-06 21:19:41 +02:00
Makefile support/scripts/graph-build-time: add support for timeline graphing 2022-03-20 23:52:24 +01:00
Makefile.legacy
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

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