Commit 8ef0273b authored by Markus Frosch's avatar Markus Frosch
Browse files

rpm: Fix extra repositories for SLES < 12

parent 5dd11eec
Pipeline #9074 passed with stage
in 24 seconds
......@@ -212,10 +212,15 @@ setup_extra_repository() {
) | sudo bash -c "cat >'/etc/zypp/credentials.d/${extra_name}'"
fi
(
source /etc/os-release
opt=()
if [ "$ID" != sles ] && [[ "$VERSION" != 11.* ]]; then
opt+=(--priority 50)
fi
set -ex
sudo zypper --non-interactive removerepo "${extra_name}" || true
sudo zypper --non-interactive addrepo --priority 50 --refresh "${extra_repository}" "${extra_name}"
)
sudo zypper --non-interactive addrepo "${opt[@]}" --refresh "${extra_repository}" "${extra_name}"
) || exit 1
;;
*)
# TODO: implement
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment