2022-05-25 14:02:09 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# to test foreign architecture package installation we choose a package which
|
|
|
|
# - is not part of the native installation set
|
|
|
|
# - does not have any dependencies
|
|
|
|
# - installs only few files
|
|
|
|
# - doesn't change its name regularly (like gcc-*-base)
|
|
|
|
|
2024-01-25 08:49:03 +00:00
|
|
|
case "$(dpkg --print-architecture)" in
|
|
|
|
arm64)
|
|
|
|
native_arch=arm64
|
|
|
|
foreign_arch=amd64
|
|
|
|
;;
|
|
|
|
amd64)
|
|
|
|
native_arch=amd64
|
|
|
|
foreign_arch=arm64
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "unsupported native architecture" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2022-05-25 14:02:09 +00:00
|
|
|
set -eu
|
|
|
|
export LC_ALL=C.UTF-8
|
2024-01-25 08:49:03 +00:00
|
|
|
{{ CMD }} --mode=root --variant=apt \
|
|
|
|
--architectures="$native_arch,$foreign_arch" \
|
|
|
|
--include="libmagic-mgc:$foreign_arch" \
|
|
|
|
{{ DIST }} /tmp/debian-chroot {{ MIRROR }}
|
|
|
|
{ echo "$native_arch"; echo "$foreign_arch"; } | cmp /tmp/debian-chroot/var/lib/dpkg/arch -
|
2022-05-25 14:02:09 +00:00
|
|
|
rm /tmp/debian-chroot/usr/lib/file/magic.mgc
|
|
|
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/README.Debian
|
2024-01-25 08:49:03 +00:00
|
|
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/"changelog.Debian.$foreign_arch.gz"
|
2022-05-25 14:02:09 +00:00
|
|
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.Debian.gz
|
|
|
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.gz
|
|
|
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/copyright
|
|
|
|
rm /tmp/debian-chroot/usr/share/file/magic.mgc
|
|
|
|
rm /tmp/debian-chroot/usr/share/misc/magic.mgc
|
2024-01-25 08:49:03 +00:00
|
|
|
rm /tmp/debian-chroot/var/lib/apt/extended_states
|
|
|
|
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.list
|
|
|
|
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.md5sums
|
2022-05-25 14:02:09 +00:00
|
|
|
rmdir /tmp/debian-chroot/usr/share/doc/libmagic-mgc/
|
|
|
|
rmdir /tmp/debian-chroot/usr/share/file/magic/
|
|
|
|
rmdir /tmp/debian-chroot/usr/share/file/
|
|
|
|
rmdir /tmp/debian-chroot/usr/lib/file/
|
|
|
|
tar -C /tmp/debian-chroot --one-file-system -c . | tar -t | sort | diff -u tar1.txt -
|
|
|
|
rm -r /tmp/debian-chroot
|