]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
make.sh: Show the packages that failed to download
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 2 Aug 2024 17:56:17 +0000 (17:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 2 Aug 2024 17:56:17 +0000 (17:56 +0000)
  https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/thread/VCTWCJKYKCGN7TUKMYWVJY3QUX4FIDT5/

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index d2054eff316fe9dc3648b624f8038108fe19b923..10ec607b16b7a13b5f2cf46281499e42ef118e1f 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1090,7 +1090,7 @@ download_sources() {
        local file
        local pkg
 
-       local status=0
+       local failed_packages=()
 
        # Walk through all files in LFS
        for file in "${BASEDIR}/lfs/"*; do
@@ -1109,15 +1109,18 @@ download_sources() {
 
                # Download and check the package
                if ! make_pkg "${pkg}" download b2; then
+                       failed_packages+=( "${pkg}" )
                        print_status FAIL
-                       status=1
                        continue
                fi
 
                print_status DONE
        done
 
-       return "${status}"
+       # Fail if we could not download/verify all packages
+       if [ "${#failed_packages[@]}" -gt 0 ]; then
+               exiterror "Failed to download or verify some packages: ${failed_packages[@]}"
+       fi
 }
 
 # Download the toolchain
@@ -2342,9 +2345,7 @@ downloadsrc)
        print_headline "Pre-loading all source files"
 
        # Download all sources
-       if ! download_sources; then
-               exiterror "Failed to download sources"
-       fi
+       download_sources
        ;;
 toolchain)
        # Launch in a new namespace