modules: mirror: opensuse: Ensure that old distros are wiped from mirrors
Mirrors still contain repositories from distributions which we do not mirror anymore. As such, lets make sure that we wipe them if necessary. Change-Id: I35f7e1659ab4e22fb4ef6c1b5673085354df4050
This commit is contained in:
parent
07ce708315
commit
ba7e8bbc1f
@ -21,7 +21,16 @@ OBS_MIRROR="rsync://ftp.gwdg.de/pub/opensuse/repositories/"
|
||||
OBS_REPOS=('Virtualization:/containers' 'Cloud:/OpenStack:/Queens' 'Cloud:/OpenStack:/Master')
|
||||
K5START="k5start -t -f /etc/opensuse.keytab service/opensuse-mirror -- timeout -k 2m 30m"
|
||||
|
||||
# NOTE(hwoarang): 15.0 is newer than 42.3
|
||||
# NOTE(hwoarang): Ensure old distros are not mirrored aymore
|
||||
for DISTVER in 42.2; do
|
||||
for REPO in distribution/leap/$DISTVER update/leap/$DISTVER; do
|
||||
if [ -d $BASE/$REPO ]; then
|
||||
$K5START rm -rf $BASE/$REPO
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# NOTE(hwoarang): 15.0 is newer than 42.3.
|
||||
for DISTVER in 42.3 15.0; do
|
||||
REPO=distribution/leap/$DISTVER
|
||||
if ! [ -f $BASE/$REPO ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user