ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: AMBARI-7982 HDP2.2. Zookeeper package creates "current/zookeeper-client" link (dsen)
Date Mon, 27 Oct 2014 16:42:56 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 5432949b1 -> e0b17bf68


AMBARI-7982 HDP2.2. Zookeeper package creates "current/zookeeper-client" link (dsen)


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

Branch: refs/heads/trunk
Commit: e0b17bf689fff30ed5d5e9aa5975c2a8664457e8
Parents: 5432949
Author: Dmytro Sen <dsen@hortonworks.com>
Authored: Mon Oct 27 18:43:05 2014 +0200
Committer: Dmytro Sen <dsen@hortonworks.com>
Committed: Mon Oct 27 18:43:05 2014 +0200

----------------------------------------------------------------------
 .../test/python/resource_management/TestPackageResource.py   | 8 ++++----
 .../python/resource_management/core/providers/package/apt.py | 2 +-
 .../resource_management/core/providers/package/yumrpm.py     | 2 +-
 .../resource_management/core/providers/package/zypper.py     | 2 +-
 .../hooks/after-INSTALL/scripts/shared_initialization.py     | 3 +--
 5 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e0b17bf6/ambari-agent/src/test/python/resource_management/TestPackageResource.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/resource_management/TestPackageResource.py b/ambari-agent/src/test/python/resource_management/TestPackageResource.py
index a28eb2d..7ec7494 100644
--- a/ambari-agent/src/test/python/resource_management/TestPackageResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestPackageResource.py
@@ -35,7 +35,7 @@ class TestPackageResource(TestCase):
     with Environment('/') as env:
       Package("some_package",
       )
-    call_mock.assert_has_calls([call("dpkg --get-selections some-package | grep -v deinstall"),
+    call_mock.assert_has_calls([call("dpkg --get-selections | grep ^some-package | grep -v
deinstall"),
                                 call("DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -q
-o Dpkg::Options::='--force-confdef'"
                                       " --allow-unauthenticated --assume-yes install some-package"),
                                 call("apt-get update -qq")
@@ -52,7 +52,7 @@ class TestPackageResource(TestCase):
     with Environment('/') as env:
       Package("some_package",
       )
-    call_mock.assert_has_calls([call("dpkg --get-selections some-package | grep -v deinstall"),
+    call_mock.assert_has_calls([call("dpkg --get-selections | grep ^some-package | grep -v
deinstall"),
                                 call("DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -q
-o Dpkg::Options::='--force-confdef'"
                                       " --allow-unauthenticated --assume-yes install some-package")
                               ])
@@ -69,7 +69,7 @@ class TestPackageResource(TestCase):
     with Environment('/') as env:
       Package("some_package",
       )
-    call_mock.assert_called_with('rpm -q --quiet some_package')
+    call_mock.assert_called_with('rpm -qa | grep ^some_package')
     shell_mock.assert_called_with("/usr/bin/yum -d 0 -e 0 -y install some_package")
 
   @patch.object(shell, "call")
@@ -80,7 +80,7 @@ class TestPackageResource(TestCase):
     with Environment('/') as env:
       Package("some_package",
       )
-    call_mock.assert_called_with('rpm -q --quiet some_package')
+    call_mock.assert_called_with('rpm -qa | grep ^some_package')
     shell_mock.assert_called_with("/usr/bin/zypper --quiet install --auto-agree-with-licenses
--no-confirm some_package")
 
   @patch.object(shell, "call", new = MagicMock(return_value=(0, None)))

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0b17bf6/ambari-common/src/main/python/resource_management/core/providers/package/apt.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/providers/package/apt.py
b/ambari-common/src/main/python/resource_management/core/providers/package/apt.py
index 19786dd..e71361b 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/package/apt.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/package/apt.py
@@ -26,7 +26,7 @@ from resource_management.core.logger import Logger
 INSTALL_CMD = "DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -q -o Dpkg::Options::='--force-confdef'
--allow-unauthenticated --assume-yes install %s"
 REPO_UPDATE_CMD = "apt-get update -qq"
 REMOVE_CMD = "/usr/bin/apt-get -y -q remove %s"
-CHECK_CMD = "dpkg --get-selections %s | grep -v deinstall"
+CHECK_CMD = "dpkg --get-selections | grep ^%s | grep -v deinstall"
 
 def replace_underscores(function_to_decorate):
   def wrapper(*args):

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0b17bf6/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
b/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
index 7b729f8..a53fadc 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
@@ -26,7 +26,7 @@ from resource_management.core.logger import Logger
 
 INSTALL_CMD = "/usr/bin/yum -d 0 -e 0 -y install %s"
 REMOVE_CMD = "/usr/bin/yum -d 0 -e 0 -y erase %s"
-CHECK_CMD = "rpm -q --quiet %s"
+CHECK_CMD = "rpm -qa | grep ^%s"
 
 class YumProvider(PackageProvider):
   def install_package(self, name):

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0b17bf6/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
b/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
index 6577c47..4364cef 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
@@ -26,7 +26,7 @@ from resource_management.core.logger import Logger
 
 INSTALL_CMD = "/usr/bin/zypper --quiet install --auto-agree-with-licenses --no-confirm %s"
 REMOVE_CMD = "/usr/bin/zypper --quiet remove --no-confirm %s"
-CHECK_CMD = "rpm -q --quiet %s"
+CHECK_CMD = "rpm -qa | grep ^%s"
 
 class ZypperProvider(PackageProvider):
   def install_package(self, name):

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0b17bf6/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
index 081906f..7eab8a6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
@@ -22,8 +22,7 @@ from resource_management import *
 def setup_hdp_install_directory():
   import params
   if params.stack_is_hdp22_or_further:
-    Execute(format('ambari-python-wrap /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select
versions | grep ^{hdp_stack_version} | tail -1`'),
-            not_if=format('test -d {versioned_hdp_root}'),
+    Execute(format('ambari-python-wrap /usr/bin/hdp-select -r set all `ambari-python-wrap
/usr/bin/hdp-select versions | grep ^{hdp_stack_version} | tail -1`'),
             only_if=format('ls -d /usr/hdp/{hdp_stack_version}*')
     )
 


Mime
View raw message