You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2017/07/12 18:16:07 UTC

ambari git commit: AMBARI-21446. Force-remove package does not work on CentOS 6 and SuSE 11

Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-21348 cb86bf06f -> b000119b6


AMBARI-21446. Force-remove package does not work on CentOS 6 and SuSE 11


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

Branch: refs/heads/branch-feature-AMBARI-21348
Commit: b000119b6216a5bac0657c8534f759589a581dda
Parents: cb86bf0
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Wed Jul 12 11:13:46 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Wed Jul 12 20:15:00 2017 +0200

----------------------------------------------------------------------
 .../src/test/python/resource_management/TestPackageResource.py   | 4 ++--
 .../python/resource_management/core/providers/package/yumrpm.py  | 2 +-
 .../python/resource_management/core/providers/package/zypper.py  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b000119b/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 bc1bfeb..51a35eb 100644
--- a/ambari-agent/src/test/python/resource_management/TestPackageResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestPackageResource.py
@@ -228,7 +228,7 @@ class TestPackageResource(TestCase):
               logoutput = False,
               ignore_dependencies = True
       )
-    shell_mock.assert_called_with(['/usr/bin/rpm', '-e', '--nodeps', 'some_package'], logoutput=False, sudo=True)
+    shell_mock.assert_called_with(['rpm', '-e', '--nodeps', 'some_package'], logoutput=False, sudo=True)
 
   @patch.object(shell, "call", new = MagicMock(return_value=(0, None)))
   @patch.object(shell, "checked_call")
@@ -256,7 +256,7 @@ class TestPackageResource(TestCase):
               logoutput = False,
               ignore_dependencies = True
       )
-    shell_mock.assert_called_with(['/usr/bin/rpm', '-e', '--nodeps', 'some_package'], logoutput=False, sudo=True)
+    shell_mock.assert_called_with(['rpm', '-e', '--nodeps', 'some_package'], logoutput=False, sudo=True)
 
   @patch.object(shell, "call", new = MagicMock(return_value=(0, None)))
   @patch.object(shell, "checked_call")

http://git-wip-us.apache.org/repos/asf/ambari/blob/b000119b/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 064b504..a2f0533 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
@@ -36,7 +36,7 @@ REMOVE_CMD = {
   False: ['/usr/bin/yum', '-d', '0', '-e', '0', '-y', 'erase'],
 }
 
-REMOVE_WITHOUT_DEPENDENCIES_CMD = ['/usr/bin/rpm', '-e', '--nodeps']
+REMOVE_WITHOUT_DEPENDENCIES_CMD = ['rpm', '-e', '--nodeps']
 
 REPO_UPDATE_CMD = ['/usr/bin/yum', 'clean','metadata']
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b000119b/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 c1aab60..f3abdb5 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
@@ -35,7 +35,7 @@ REMOVE_CMD = {
   False: ['/usr/bin/zypper', '--quiet', 'remove', '--no-confirm'],
 }
 
-REMOVE_WITHOUT_DEPENDENCIES_CMD = ['/usr/bin/rpm', '-e', '--nodeps']
+REMOVE_WITHOUT_DEPENDENCIES_CMD = ['rpm', '-e', '--nodeps']
 
 REPO_UPDATE_CMD = ['/usr/bin/zypper', 'clean']