elements: zypper-minimal: Refresh repositories where necessary
We should always refresh the Tumbleweed repositories and the 'update' one for Leap in order to always have the latest information from the repositories. Change-Id: I85db9d8bb7fa153f01222129e9b36fecc2632f57
This commit is contained in:
parent
da02f37de1
commit
7f051add61
@ -62,9 +62,13 @@ case ${DIB_RELEASE} in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
for repo in ${ZYPPER_REPOS}; do
|
for repo in ${ZYPPER_REPOS}; do
|
||||||
|
refresh_repo=""
|
||||||
reponame=repo-${repo%%=>*}
|
reponame=repo-${repo%%=>*}
|
||||||
repouri=${repo##*=>}
|
repouri=${repo##*=>}
|
||||||
sudo zypper ${ZYPPER_TARGET_OPTS} addrepo --name ${reponame} --keep-packages ${repouri} ${reponame}
|
# Refresh all repos in TW and only the update one for the stable ones. This will ensure that
|
||||||
|
# we always get the latest information from the repo.
|
||||||
|
[[ ${DIB_RELEASE} == tumbleweed ]] || [[ ${reponame} == "repo-update" ]] && refresh_repo="-f"
|
||||||
|
sudo zypper ${ZYPPER_TARGET_OPTS} addrepo --name ${reponame} --keep-packages ${refresh_repo} ${repouri} ${reponame}
|
||||||
done
|
done
|
||||||
|
|
||||||
# It appears that zypper will clean up the repo's cache when it (re-)adds the
|
# It appears that zypper will clean up the repo's cache when it (re-)adds the
|
||||||
|
Loading…
Reference in New Issue
Block a user