Skip to content

Add explicit fallback sources for failed package downloads - #267

Merged
markus-perl merged 8 commits into
masterfrom
copilot/multi-source-download-support
Aug 24, 2026
Merged

Add explicit fallback sources for failed package downloads#267
markus-perl merged 8 commits into
masterfrom
copilot/multi-source-download-support

Conversation

Copilot AI commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The build script was effectively single-source for several upstream packages. When a mirror or host timed out or served a truncated archive, the package build failed instead of trying a known alternate source.

  • Summary

    • Allow package downloads to accept multiple URLs while preserving the existing retry and checksum checks.
    • Add explicit fallback sources for the GNU and pkg-config mirrors that commonly fail in practice.
  • What changed

    • download() now accepts a list of sources and tries each URL in order before aborting.
    • GNU-based packages now declare primary + mirror URLs explicitly instead of hard-coding mirror logic into the helper layer.
    • pkg-config now declares a pkgconfig.freedesktop.org source and a GitHub release fallback.
    • Existing checksum validation and cached-file safety remain in place; fallback behavior only applies during a failed fresh download attempt.
  • Example

DOWNLOAD_SOURCES=(
  "https://ftp.gnu.org/gnu/m4/m4-$CURRENT_PACKAGE_VERSION.tar.gz"
  "https://ftpmirror.gnu.org/gnu/m4/m4-$CURRENT_PACKAGE_VERSION.tar.gz"
)
download "${DOWNLOAD_SOURCES[@]}"

This keeps the failure mode predictable while making common mirror outages recoverable without changing the rest of the build flow.

Co-authored-by: markus-perl <1220081+markus-perl@users.noreply.github.com>
Co-authored-by: markus-perl <1220081+markus-perl@users.noreply.github.com>
Co-authored-by: markus-perl <1220081+markus-perl@users.noreply.github.com>
Co-authored-by: markus-perl <1220081+markus-perl@users.noreply.github.com>
Co-authored-by: markus-perl <1220081+markus-perl@users.noreply.github.com>
Co-authored-by: markus-perl <1220081+markus-perl@users.noreply.github.com>
Copilot AI and others added 2 commits August 24, 2026 06:24
Co-authored-by: markus-perl <1220081+markus-perl@users.noreply.github.com>
Co-authored-by: markus-perl <1220081+markus-perl@users.noreply.github.com>
@markus-perl
markus-perl marked this pull request as ready for review August 24, 2026 07:55
@markus-perl
markus-perl merged commit 4c4558c into master Aug 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants