From: Michael Tremer Date: Fri, 24 Jan 2025 16:15:30 +0000 (+0000) Subject: jenkins: Apply architecture to apt preferences X-Git-Tag: 0.9.30~382 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f65fcd132b0696c5d5627f596618f17a237b3fa1;p=pakfire.git jenkins: Apply architecture to apt preferences Signed-off-by: Michael Tremer --- diff --git a/Jenkinsfile b/Jenkinsfile index c8752ecf..224eb31c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,7 +51,7 @@ pipeline { // Debian & Ubuntu } else if (env.DISTRO.contains("debian") || env.DISTRO.contains("ubuntu")) { - installBuildDepsDebian(env.DISTRO, env.COMPILER) + installBuildDepsDebian(env.DISTRO, env.COMPILER, "amd64") } } } @@ -141,7 +141,7 @@ pipeline { stage("Install Dependencies") { steps { script { - installBuildDepsDebian("trixie", "clang") + installBuildDepsDebian("trixie", "clang", "amd64") // Install Clang Tools sh "apt-get install -y clang-tools" @@ -193,7 +193,7 @@ pipeline { stage("Install Dependencies") { steps { script { - installBuildDepsDebian("bookworm-backports", "gcc") + installBuildDepsDebian("bookworm-backports", "gcc", "amd64") // Install lcov sh "apt-get install -y lcov" @@ -297,7 +297,7 @@ pipeline { steps { // Prefer backports for some packages script { - preferBackports(env.IMAGE) + preferBackports(env.IMAGE, env.ARCH) } // Add the architecture @@ -609,9 +609,9 @@ def installBuildDepsArchLinux(distro, compiler) { } // Installs everything we need on Debian -def installBuildDepsDebian(distro, compiler) { +def installBuildDepsDebian(distro, compiler, arch) { // Prefer backports? - preferBackports(distro) + preferBackports(distro, arch) sh "apt-get update" sh """ @@ -652,14 +652,14 @@ def installBuildDepsDebian(distro, compiler) { """ } -def preferBackports(distro) { +def preferBackports(distro, arch) { if (distro.contains("bookworm")) { sh """ ( - echo "Package: curl libcurl*" - echo "Pin: release n=bookworm-backports" + echo "Package: curl curl:${arch} libcurl* libcurl*:${arch}" + echo "Pin: release n=${distro.replace("debian:", "")}" echo "Pin-Priority: 900" - ) > /etc/apt/preferences.d/99debian-backports + ) > /etc/apt/preferences.d/99backports """ } }