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 93E33200CDF for ; Thu, 17 Aug 2017 20:58:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 924C316B7D8; Thu, 17 Aug 2017 18:58:23 +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 8CB6A16B7CE for ; Thu, 17 Aug 2017 20:58:22 +0200 (CEST) Received: (qmail 99435 invoked by uid 500); 17 Aug 2017 18:58:21 -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 98389 invoked by uid 99); 17 Aug 2017 18:58:19 -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; Thu, 17 Aug 2017 18:58:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C29D7F5EDA; Thu, 17 Aug 2017 18:58:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jonathanhurley@apache.org To: commits@ambari.apache.org Date: Thu, 17 Aug 2017 18:58:32 -0000 Message-Id: <68480af58dd24907b53ddb0d6e257f46@git.apache.org> In-Reply-To: <532001b505564cdeaaaf79b1caa33753@git.apache.org> References: <532001b505564cdeaaaf79b1caa33753@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [15/18] ambari git commit: AMBARI-21744. package_regex in get_package_from_available() can match wrong pkg (dlysnichenko) archived-at: Thu, 17 Aug 2017 18:58:23 -0000 AMBARI-21744. package_regex in get_package_from_available() can match wrong pkg (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aa4807ca Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aa4807ca Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aa4807ca Branch: refs/heads/branch-feature-AMBARI-21450 Commit: aa4807ca3a850d3275b11c9ee41a0cb6c5328b9c Parents: ec6a714 Author: Lisnichenko Dmitro Authored: Thu Aug 17 18:04:09 2017 +0300 Committer: Lisnichenko Dmitro Committed: Thu Aug 17 18:04:35 2017 +0300 ---------------------------------------------------------------------- .../src/main/python/resource_management/libraries/script/script.py | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/aa4807ca/ambari-common/src/main/python/resource_management/libraries/script/script.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index 54a7e6d..bc0d7d3 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -451,6 +451,7 @@ class Script(object): return name package_delimiter = '-' if OSCheck.is_ubuntu_family() else '_' package_regex = name.replace(STACK_VERSION_PLACEHOLDER, '(\d|{0})+'.format(package_delimiter)) + package_regex = "^{0}$".format(package_regex) for package in available_packages_in_repos: if re.match(package_regex, package): return package