Commit 7aa1545b authored by Raphaël Hertzog's avatar Raphaël Hertzog

Make write-built-using more robust

There are cases where a package is known to dpkg due to Provides
or Suggests, but where it's not installed and where we don't want to
generate a broken Built-Using entry.

I recently had the case on arm64 where u-boot-rockchip is not installed
but where it would still generate an entry:

  ./build/util/write-built-using
  dh_gencontrol
  dpkg-gencontrol: warning: can't parse dependency u-boot-rockchip (= )
parent 5865ab24
......@@ -10,6 +10,10 @@ echo >> debian/debian-installer.substvars
EXTRA_PACKAGES="bf-utf-source syslinux u-boot-imx u-boot-omap u-boot-sunxi u-boot-rockchip arm-trusted-firmware"
echo -n "extra:Built-Using=" >> debian/debian-installer.substvars
for package in $EXTRA_PACKAGES; do
dpkg-query -f '${source:Package} (= ${source:Version}), ' -W $package 2>/dev/null
if dpkg-query -f '${db:Status-Status}' -W $package 2>/dev/null | grep -q ^installed$; then
dpkg-query -f '${source:Package} (= ${source:Version}), ' -W $package 2>/dev/null
else
echo "INFO: $package not installed, not added to Built-Using" >&2
fi
done >> debian/debian-installer.substvars
echo >> debian/debian-installer.substvars
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment