Bug#1145443: cross-toolchain-base: please replace apt-cache by dpkg-query

Jochen Sprickerhof jspricke at debian.org
Tue Aug 25 09:20:39 BST 2026


Source: cross-toolchain-base
Version: 81
Severity: normal
Tags: patch
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
User: reproducible-builds at lists.alioth.debian.org
Usertags: environment

Hi Matthias,

this is kind of a follow up to #1103563 to use dpkg-query to make the
package reproducible after the linux-libc-dev reorganization. Patch
attached.


Please also apply it to cross-toolchain-base-ports.

Cheers Jochen
-------------- next part --------------
diff --git a/debian/new_cross_version.sh b/debian/new_cross_version.sh
index 30d76fa..6334d14 100644
--- a/debian/new_cross_version.sh
+++ b/debian/new_cross_version.sh
@@ -11,11 +11,11 @@ fi
 cross=c
 cross=cross
 
-v_deb_linux=$(apt-cache policy linux-libc-dev | awk '/^ \*\*\*/ {print $2}')
+v_deb_linux=$(dpkg-query -W -f '${Version}' linux-libc-dev)
 v_deb_glibc=$(dpkg-parsechangelog -l/usr/src/glibc/debian/changelog | egrep '^Version:' | cut -f 2 -d ' ')
 
-v_deb_linux_cross=$(apt-cache show --no-all-versions linux-libc-dev-$arch-cross 2>/dev/null | awk '/^Version:/ {print $2}')
-v_deb_glibc_cross=$(apt-cache show --no-all-versions libc6-$arch-cross 2>/dev/null | awk '/^Version/ {print $2}')
+v_deb_linux_cross=$(dpkg-query -W -f '${Version}' linux-libc-dev-$arch-cross)
+v_deb_glibc_cross=$(dpkg-query -W -f '${Version}' libc6-$arch-cross)
 
 echo >&2 "linux: $v_deb_linux / $v_deb_linux_cross"
 echo >&2 "glibc: $v_deb_glibc / $v_deb_glibc_cross"


More information about the Reproducible-bugs mailing list