Add openSUSE Leap release in opensuse template

Signed-off-by: Terzeus S. Dominguez <zeus@dmgznet.com>
This commit is contained in:
Terzeus S. Dominguez 2016-01-10 23:13:48 +08:00
parent c7ec3de825
commit f2d63d7ac4
No known key found for this signature in database
GPG Key ID: 5C14F72989F78D66

View File

@ -136,7 +136,12 @@ download_opensuse()
echo "Downloading opensuse minimal ..."
mkdir -p "$cache/partial-$arch-packages"
zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/distribution/$DISTRO/repo/oss/ repo-oss || return 1
# Leap update repos were rearranged
if [ $DISTRO == "leap/42.1" ]; then
zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/oss/ update || return 1
else
zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1
fi
zypper --quiet --root $cache/partial-$arch-packages --non-interactive --gpg-auto-import-keys update || return 1
zypper --root $cache/partial-$arch-packages --non-interactive in --auto-agree-with-licenses --download-only zypper lxc patterns-openSUSE-base bash iputils sed tar rsyslog || return 1
cat > $cache/partial-$arch-packages/opensuse.conf << EOF
@ -157,7 +162,7 @@ Support: ncurses-utils
Support: iputils
Support: udev
Support: netcfg
Support: dhcpcd hwinfo insserv-compat module-init-tools openSUSE-release openssh
Support: hwinfo insserv-compat module-init-tools openSUSE-release openssh
Support: pwdutils rpcbind sysconfig
Ignore: rpm:suse-build-key,build-key
@ -169,6 +174,12 @@ EOF
echo "Support: python3-base" >> $cache/partial-$arch-packages/opensuse.conf
fi
# dhcpcd is not in the default repos with Leap 42.1
if [ $DISTRO != "leap/42.1"]
then
echo "Support: dhcpcd" >> $cache/partial-$arch-packages/opensuse.conf
fi
if [ "$arch" = "i686" ]; then
mkdir -p $cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/i686/
for i in "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/i586/*" ; do
@ -444,6 +455,11 @@ else
echo "Selected openSUSE 13.2"
;;
42.1|leap/42.1|leap)
echo "Selected openSUSE Leap 42.1"
DISTRO="leap/42.1"
;;
*)
echo "You have chosen an invalid release, quitting..."
exit 1