summaryrefslogtreecommitdiffstats
path: root/tests/dist-using-codename
blob: 96d89299eb1dabb420f56f71f5bedaa1da7a95d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
#
# make sure that using codenames works https://bugs.debian.org/1003191

set -eu
export LC_ALL=C.UTF-8
trap "rm -f InRelease; rm -rf /tmp/debian-chroot.tar /tmp/expected" EXIT INT TERM
/usr/lib/apt/apt-helper download-file "{{ MIRROR }}/dists/{{ DIST }}/InRelease" InRelease
codename=$(awk '/^Codename: / { print $2; }' InRelease)
{{ CMD }} --mode={{ MODE }} --variant=apt "$codename" /tmp/debian-chroot.tar {{ MIRROR }}
echo "deb {{ MIRROR }} $codename main" > /tmp/expected
tar --to-stdout --extract --file /tmp/debian-chroot.tar ./etc/apt/sources.list \
	| diff -u /tmp/expected -