Commit 73fd6977 by Terzeus S. Dominguez Committed by Stéphane Graber

Update openSUSE template for Leap 42.2

Aside from adding a 42.2 option, $DISTRO comparisons for Leap have been changed [ exp ] => [[ exp ]] to accomodate pattern matching for future releases. Signed-off-by: 's avatarTerzeus S. Dominguez <tsdmgz@gmail.com>
parent 90cf7f89
...@@ -145,7 +145,7 @@ download_opensuse() ...@@ -145,7 +145,7 @@ download_opensuse()
mkdir -p "$cache/partial-$arch-packages" 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 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 # Leap update repos were rearranged
if [ $DISTRO == "leap/42.1" ]; then if [[ $DISTRO == "leap/4"* ]]; then
zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/oss/ update || return 1 zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/oss/ update || return 1
else else
zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1 zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1
...@@ -182,14 +182,14 @@ EOF ...@@ -182,14 +182,14 @@ EOF
echo "Support: python3-base" >> $cache/partial-$arch-packages/opensuse.conf echo "Support: python3-base" >> $cache/partial-$arch-packages/opensuse.conf
fi fi
# dhcpcd is not in the default repos with Leap 42.1 # dhcpcd is not in the default repos since Leap 42.1
if [ $DISTRO != "leap/42.1" ] if [[ $DISTRO != "leap/4"* ]]
then then
echo "Support: dhcpcd" >> $cache/partial-$arch-packages/opensuse.conf echo "Support: dhcpcd" >> $cache/partial-$arch-packages/opensuse.conf
fi fi
# Leap doesn't seem to have iproute2 utils installed # Leap doesn't seem to have iproute2 utils installed
if [ $DISTRO == "leap/42.1" ] if [[ $DISTRO == "leap/4"* ]]
then then
echo "Support: net-tools iproute2" >> $cache/partial-$arch-packages/opensuse.conf echo "Support: net-tools iproute2" >> $cache/partial-$arch-packages/opensuse.conf
fi fi
...@@ -210,11 +210,13 @@ EOF ...@@ -210,11 +210,13 @@ EOF
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 --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 --repository $cache/partial-$arch-packages/var/cache/zypp/packages/update/$arch --repository $cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch || return 1 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 --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 --repository $cache/partial-$arch-packages/var/cache/zypp/packages/update/$arch --repository $cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch || return 1
chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar http://download.opensuse.org/distribution/$DISTRO/repo/oss repo-oss || return 1 chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar http://download.opensuse.org/distribution/$DISTRO/repo/oss repo-oss || return 1
if [ $DISTRO == "leap/42.1" ]; then
if [[ $DISTRO == "leap/4"* ]]; then
chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar http://download.opensuse.org/update/$DISTRO/oss update || return 1 chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar http://download.opensuse.org/update/$DISTRO/oss update || return 1
else else
chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1 chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1
fi fi
# really clean the image # really clean the image
rm -fr $cache/partial-$arch/{.build,.guessed_dist,.srcfiles*,installed-pkg} rm -fr $cache/partial-$arch/{.build,.guessed_dist,.srcfiles*,installed-pkg}
rm -fr $cache/partial-$arch/dev rm -fr $cache/partial-$arch/dev
...@@ -478,6 +480,11 @@ else ...@@ -478,6 +480,11 @@ else
DISTRO="leap/42.1" DISTRO="leap/42.1"
;; ;;
42.2|leap/42.2|422)
echo "Selected openSUSE Leap 42.2"
DISTRO="leap/42.2"
;;
*) *)
echo "You have chosen an invalid release, quitting..." echo "You have chosen an invalid release, quitting..."
exit 1 exit 1
......
Markdown is supported
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