Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4A4AF200CB5 for ; Wed, 12 Jul 2017 20:16:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 48E7A163CAE; Wed, 12 Jul 2017 18:16:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 602571639DC for ; Wed, 12 Jul 2017 20:16:08 +0200 (CEST) Received: (qmail 91277 invoked by uid 500); 12 Jul 2017 18:16:07 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 91268 invoked by uid 99); 12 Jul 2017 18:16:07 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2017 18:16:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5CA56DFBA2; Wed, 12 Jul 2017 18:16:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: adoroszlai@apache.org To: commits@ambari.apache.org Message-Id: <9f7137add8ff44fe8e492284d58cb64c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-21446. Force-remove package does not work on CentOS 6 and SuSE 11 Date: Wed, 12 Jul 2017 18:16:07 +0000 (UTC) archived-at: Wed, 12 Jul 2017 18:16:09 -0000 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 Authored: Wed Jul 12 11:13:46 2017 +0200 Committer: Attila Doroszlai 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']