mirror of
https://github.com/lxc/lxc-templates.git
synced 2024-12-22 22:40:16 +00:00
templates: opensuse: Drop support for EOL distributions
All releases prior to 42.X have reached EOL so we can drop these codepaths in order to simplify the code. This also fixes an indentation issue. Signed-off-by: Markos Chandras <mchandras@suse.de>
This commit is contained in:
parent
ad989b77a4
commit
2dc3dc54a5
@ -148,13 +148,9 @@ download_opensuse()
|
||||
fi
|
||||
zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar "$oss_repo_url" repo-oss || return 1
|
||||
|
||||
update_repo_url="http://download.opensuse.org/update/$DISTRO/repo/oss"
|
||||
# Leap update repos were rearranged
|
||||
if [[ $DISTRO == "leap/4"* ]] || [[ $DISTRO == "leap/1"* ]]; then
|
||||
update_repo_url="http://download.opensuse.org/update/$DISTRO/oss/"
|
||||
fi
|
||||
# tumbleweed has no update repo
|
||||
if [[ $DISTRO != "tumbleweed" ]]; then
|
||||
update_repo_url="http://download.opensuse.org/update/$DISTRO/oss/"
|
||||
zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar "$update_repo_url" update || return 1
|
||||
fi
|
||||
|
||||
@ -181,31 +177,17 @@ Support: udev
|
||||
Support: netcfg
|
||||
Support: hwinfo insserv-compat module-init-tools openSUSE-release openssh
|
||||
Support: pwdutils sysconfig
|
||||
Support: net-tools iproute2
|
||||
|
||||
Ignore: rpm:suse-build-key,build-key
|
||||
Ignore: systemd:systemd-presets-branding
|
||||
EOF
|
||||
|
||||
if [ $DISTRO = "13.2" ]
|
||||
then
|
||||
echo "Support: python3-base" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
fi
|
||||
|
||||
if [[ $DISTRO == "tumbleweed" ]]; then
|
||||
echo "Preinstall: liblua5_3 libncurses6 libreadline7" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
echo "Preinstall: liblua5_3 libncurses6 libreadline7" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
else
|
||||
echo "Preinstall: liblua5_1 libncurses5 libreadline6" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
echo "Support: rpcbind" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
fi
|
||||
|
||||
# dhcpcd is not in the default repos since Leap 42.1, neither in tumbleweed
|
||||
if [[ $DISTRO != "leap/4"* ]] && [[ $DISTRO != "leap/1"* ]] && [[ $DISTRO != "tumbleweed" ]]; then
|
||||
echo "Support: dhcpcd" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
fi
|
||||
|
||||
# Leap and tumbleweed doesn't seem to have iproute2 utils installed
|
||||
if [[ $DISTRO == "leap/4"* ]] || [[ $DISTRO == "leap/1"* ]] || [[ $DISTRO == "tumbleweed" ]]; then
|
||||
echo "Support: net-tools iproute2" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
echo "Preinstall: liblua5_1 libncurses5 libreadline6" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
echo "Support: rpcbind" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
fi
|
||||
|
||||
if [ "$arch" = "i686" ]; then
|
||||
@ -224,7 +206,7 @@ EOF
|
||||
|
||||
repos=("--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/$arch" "--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/noarch")
|
||||
if [[ $DISTRO != "tumbleweed" ]]; then # tumbleweed has no update repo
|
||||
repos+=("--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/update/$arch" "--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch")
|
||||
repos+=("--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/update/$arch" "--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch")
|
||||
fi
|
||||
|
||||
CLEAN_BUILD=1 BUILD_ARCH="$arch" BUILD_ROOT="$cache/partial-$arch" BUILD_DIST="$cache/partial-$arch-packages/opensuse.conf" PATH="$PATH:$BUILD_DIR" $BUILD_DIR/init_buildsystem --clean --configdir $BUILD_DIR/configs --cachedir $cache/partial-$arch-cache ${repos[*]} || return 1
|
||||
|
Loading…
Reference in New Issue
Block a user