// Debian & Ubuntu
} else if (env.DISTRO.contains("debian") || env.DISTRO.contains("ubuntu")) {
- installBuildDepsDebian(env.DISTRO, env.COMPILER)
+ installBuildDepsDebian(env.DISTRO, env.COMPILER, "amd64")
}
}
}
stage("Install Dependencies") {
steps {
script {
- installBuildDepsDebian("trixie", "clang")
+ installBuildDepsDebian("trixie", "clang", "amd64")
// Install Clang Tools
sh "apt-get install -y clang-tools"
stage("Install Dependencies") {
steps {
script {
- installBuildDepsDebian("bookworm-backports", "gcc")
+ installBuildDepsDebian("bookworm-backports", "gcc", "amd64")
// Install lcov
sh "apt-get install -y lcov"
steps {
// Prefer backports for some packages
script {
- preferBackports(env.IMAGE)
+ preferBackports(env.IMAGE, env.ARCH)
}
// Add the architecture
}
// 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 """
"""
}
-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
"""
}
}