make_mirror.sh: filter out file:// mirrors when USE_HOST_APT_CONFIG=yes
This commit is contained in:
parent
5471b372e2
commit
c3bcc7b04a
1 changed files with 16 additions and 4 deletions
|
@ -174,10 +174,22 @@ END
|
||||||
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*; do
|
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*; do
|
||||||
[ -e "$f" ] || continue
|
[ -e "$f" ] || continue
|
||||||
[ -e "$rootdir/$f" ] && echo >> "$rootdir/$f"
|
[ -e "$rootdir/$f" ] && echo >> "$rootdir/$f"
|
||||||
# we do not add entries from deb.debian.org or
|
# Filter out file:// repositories as they are added
|
||||||
# otherwise tests will fail if mirror pushes happen
|
# to each mmdebstrap call verbatim by
|
||||||
# while the script is running
|
# debian/tests/copy_host_apt_config
|
||||||
grep -v deb.debian.org/debian "$f" >> "$rootdir/$f" || :
|
# Also filter out all mirrors that are not of suite
|
||||||
|
# $DEFAULT_DIST, except experimental if the suite
|
||||||
|
# is unstable. This prevents packages from
|
||||||
|
# unstable entering a testing mirror.
|
||||||
|
if [ "$dist" = unstable ]; then
|
||||||
|
grep -v ' file://' "$f" \
|
||||||
|
| grep -E " (unstable|experimental) " \
|
||||||
|
>> "$rootdir/$f" || :
|
||||||
|
else
|
||||||
|
grep -v ' file://' "$f" \
|
||||||
|
| grep " $DEFAULT_DIST " \
|
||||||
|
>> "$rootdir/$f" || :
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
for f in /etc/apt/preferences.d/*; do
|
for f in /etc/apt/preferences.d/*; do
|
||||||
[ -e "$f" ] || continue
|
[ -e "$f" ] || continue
|
||||||
|
|
Loading…
Reference in a new issue