summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnqnfe <jnqnfe@gmail.com>2014-12-02 01:48:28 +0000
committerLuca Boccassi <bluca@debian.org>2020-03-11 11:45:27 +0000
commit87e9543c98a5b8d22fe1659b73f2927bdf6e895f (patch)
tree1e54b3b78081dc7e0b7e68923ad694b31690267a
parentf1647f0dac0022fdb92c5f4b315626d1049a0aec (diff)
downloadvyos-live-build-87e9543c98a5b8d22fe1659b73f2927bdf6e895f.tar.gz
vyos-live-build-87e9543c98a5b8d22fe1659b73f2927bdf6e895f.zip
source: target downloads with corresponding version
Prefer downloading the version of the source package that actually corresponds to the version of the binary. Should apt-update be run and a package updated, we do not really want to fetch a newer copy of the source than that of the binary, we want the exact corresponding version (kinda the whole point of compiling a source disc that they correspond). If the exact version is no longer available then it is surely preferable to list it in the missing list than end up with a newer version. Gbp-Dch: Short Closes: #952932
-rwxr-xr-xscripts/build/source_debian10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/build/source_debian b/scripts/build/source_debian
index bcd45a65b..36a654e26 100755
--- a/scripts/build/source_debian
+++ b/scripts/build/source_debian
@@ -46,7 +46,15 @@ then
fi
# Download sources
-Chroot chroot "dpkg --get-selections" | awk '{ print $1 }' > source-selection.txt
+
+cat >> chroot/source-selection.sh << EOF
+#!/bin/sh
+dpkg-query -W -f='\${binary:Package}=\${Version}\n' > source-selection.txt
+EOF
+
+Chroot chroot "sh source-selection.sh"
+rm -f chroot/source-selection.sh
+mv chroot/source-selection.txt ./
echo "${LB_BOOTLOADERS}" | \
while IFS="," read -r BOOTLOADER