2022-05-25 14:02:09 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# make sure that using codenames works https://bugs.debian.org/1003191
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
export LC_ALL=C.UTF-8
|
2023-03-02 16:24:14 +00:00
|
|
|
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)
|
2023-02-10 12:01:37 +00:00
|
|
|
{{ CMD }} --mode={{ MODE }} --variant=apt "$codename" /tmp/debian-chroot.tar {{ MIRROR }}
|
2024-10-11 16:29:25 +00:00
|
|
|
echo "deb {{ MIRROR }} $codename main" >/tmp/expected
|
2023-02-10 12:01:37 +00:00
|
|
|
tar --to-stdout --extract --file /tmp/debian-chroot.tar ./etc/apt/sources.list \
|
2024-10-11 16:29:25 +00:00
|
|
|
| diff -u /tmp/expected -
|