You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2020/06/24 00:23:39 UTC

[impala] 02/02: IMPALA-9871: Simplify OS version matching for SLES in bootstrap_toolchain.py

This is an automated email from the ASF dual-hosted git repository.

stakiar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 4d4c364258019cff4a4f2e9191b02e9b7efa19a8
Author: Laszlo Gaal <la...@cloudera.com>
AuthorDate: Fri Jun 19 16:34:29 2020 +0200

    IMPALA-9871: Simplify OS version matching for SLES in bootstrap_toolchain.py
    
    bin/bootstrap_toolchain.py failed to recognize SLES12 sp5, which broke
    builds on that platform.
    
    This patch simplifies OS version parsing and matching for SLES, omitting
    the check for the OS minor version, which shows the SP level for SLES.
    This is similar to how Red Hat variants are handled. This gets
    rid of the constant update need whenever a new SP level is released for
    SLES12.
    This is enabled by the native toolchain sharing a single set of artifacts
    between all the SLES12 SP levels.
    
    Test: ran a successful build on a SLES12sp5 box.
    
    Change-Id: Id9ada210b915050fbceebb7364e130116e9244d0
    Reviewed-on: http://gerrit.cloudera.org:8080/16102
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 bin/bootstrap_toolchain.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/bin/bootstrap_toolchain.py b/bin/bootstrap_toolchain.py
index 53d0f8b..2e01f9e 100755
--- a/bin/bootstrap_toolchain.py
+++ b/bin/bootstrap_toolchain.py
@@ -85,8 +85,7 @@ OS_MAPPING = [
   OsMapping("debian8", "ec2-package-debian-8", "debian8"),
   OsMapping("suselinux11", "ec2-package-sles-11", None),
   OsMapping("suselinux12", "ec2-package-sles-12", "sles12"),
-  OsMapping("suse12.2", "ec2-package-sles-12", "sles12"),
-  OsMapping("suse12.3", "ec2-package-sles-12", "sles12"),
+  OsMapping("suse12", "ec2-package-sles-12", "sles12"),
   OsMapping("ubuntu12.04", "ec2-package-ubuntu-12-04", None),
   OsMapping("ubuntu14.04", "ec2-package-ubuntu-14-04", None),
   OsMapping("ubuntu15.04", "ec2-package-ubuntu-14-04", None),
@@ -361,7 +360,7 @@ def get_platform_release_label(release=None):
       lsb_release = check_output(["lsb_release", "-irs"])
       release = "".join(map(lambda x: x.lower(), lsb_release.split()))
       # Only need to check against the major release if RHEL or CentOS
-      for platform in ['centos', 'redhatenterpriseserver']:
+      for platform in ['centos', 'redhatenterpriseserver', 'suse']:
         if platform in release:
           release = release.split('.')[0]
           break