forked from josch/mmdebstrap
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
|
||||
[ -e "$f" ] || continue
|
||||
[ -e "$rootdir/$f" ] && echo >> "$rootdir/$f"
|
||||
# we do not add entries from deb.debian.org or
|
||||
# otherwise tests will fail if mirror pushes happen
|
||||
# while the script is running
|
||||
grep -v deb.debian.org/debian "$f" >> "$rootdir/$f" || :
|
||||
# Filter out file:// repositories as they are added
|
||||
# to each mmdebstrap call verbatim by
|
||||
# debian/tests/copy_host_apt_config
|
||||
# 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
|
||||
for f in /etc/apt/preferences.d/*; do
|
||||
[ -e "$f" ] || continue
|
||||
|
|
Loading…
Reference in a new issue