Update opensuse mirror script to more completely clean up

There are a number of issues with opensuse mirroring content cleanup
that this change aims to address. First up we fix the prefix for the
CentOS 7 networking content; it needed a repositories/ prefix. At the
same time we don't bother deleting the leaf data and instead delete the
more top level directory since we're cleaning this all up.

We then apply this top level cleanup to all of the repositories,
distributions, and updates. This is largely a noop (just some directory
removals) except in the case of update/ which still contains leap 15.2
update packages. These were apparently missed in the initial opensuse
cleaup.

After this lands we should end up with a largely empty volume.

Change-Id: Ic854fcecd1a0fabc388640a33da7e4e1f9ec07c0
This commit is contained in:
Clark Boylan 2024-03-18 15:46:28 -07:00
parent 772cd8e2ad
commit a0ae3481dd

View File

@ -33,13 +33,10 @@ OBS_REPOS=()
K5START="k5start -t -f /etc/opensuse.keytab service/opensuse-mirror -- $TIMEOUT" K5START="k5start -t -f /etc/opensuse.keytab service/opensuse-mirror -- $TIMEOUT"
# NOTE(hwoarang): Ensure old distros are not mirrored aymore # NOTE(hwoarang): Ensure old distros are not mirrored aymore
for REPO in distribution/leap/15.1 update/leap/15.1 distribution/leap/15.2 \ for REPO in distribution/leap update/leap \
repositories/Cloud:/OpenStack:/Stein/openSUSE_Leap_15.1 \ repositories/Cloud: \
repositories/Cloud:/OpenStack:/Master/openSUSE_Leap_15.1 \ repositories/Virtualization: \
repositories/Cloud:/OpenStack:/Ussuri/openSUSE_Leap_15.2 \ repositories/network: ; do
repositories/Cloud:/OpenStack:/Master/openSUSE_Leap_15.2 \
network:/ha-clustering:/Stable/CentOS_CentOS-7 \
update/tumbleweed tumbleweed ; do
if [ -d $BASE/$REPO ]; then if [ -d $BASE/$REPO ]; then
$K5START rm -rf $BASE/$REPO $K5START rm -rf $BASE/$REPO
fi fi