You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/11/28 21:20:26 UTC

[07/24] ambari git commit: AMBARI-22454. ambari-server upgrade to 2.6.1 should surface the GPL agreement (aonishuk)

AMBARI-22454. ambari-server upgrade to 2.6.1 should surface the GPL agreement (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f35fd4e6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f35fd4e6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f35fd4e6

Branch: refs/heads/branch-2.6
Commit: f35fd4e672d071a22c172855f74bda7e05712fd4
Parents: 2f02bc6
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Nov 17 16:03:20 2017 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Nov 17 16:04:18 2017 +0200

----------------------------------------------------------------------
 .../src/main/python/ambari_server/serverConfiguration.py      | 7 ++-----
 ambari-server/src/main/python/ambari_server/serverSetup.py    | 5 +++--
 2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f35fd4e6/ambari-server/src/main/python/ambari_server/serverConfiguration.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index 6e19b48..8697e4c 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -1149,7 +1149,7 @@ def update_ambari_env():
 
   return 0
 
-def write_gpl_license_accepted(is_silent=False):
+def write_gpl_license_accepted():
   properties = get_ambari_properties()
   if properties == -1:
     err = "Error getting ambari properties"
@@ -1159,10 +1159,7 @@ def write_gpl_license_accepted(is_silent=False):
   if GPL_LICENSE_ACCEPTED_PROPERTY in properties.keys() and properties.get_property(GPL_LICENSE_ACCEPTED_PROPERTY).lower() == "true":
     return True
 
-  if is_silent:
-    result = options.accept_gpl
-  else:
-    result = get_YN_input(GPL_LICENSE_PROMPT_TEXT, True)
+  result = get_YN_input(GPL_LICENSE_PROMPT_TEXT, True)
 
   properties.process_pair(GPL_LICENSE_ACCEPTED_PROPERTY, str(result).lower())
   update_properties(properties)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f35fd4e6/ambari-server/src/main/python/ambari_server/serverSetup.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py b/ambari-server/src/main/python/ambari_server/serverSetup.py
index 4ffe0bc..50992d1 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -1128,8 +1128,9 @@ def setup(options):
     err = 'Downloading or installing JDK failed: {0}. Exiting.'.format(e)
     raise FatalException(e.code, err)
 
-  print 'Checking GPL software agreement...'
-  write_gpl_license_accepted(is_silent=get_silent())
+  if not get_silent() or options.accept_gpl:
+    print 'Checking GPL software agreement...'
+    write_gpl_license_accepted()
 
   print 'Completing setup...'
   retcode = configure_os_settings()