Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io 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 50D041637CB for ; Tue, 22 Aug 2017 20:02:21 +0200 (CEST) Received: (qmail 28357 invoked by uid 500); 22 Aug 2017 18:02:18 -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 28341 invoked by uid 99); 22 Aug 2017 18:02:18 -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; Tue, 22 Aug 2017 18:02:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 193BFE0014; Tue, 22 Aug 2017 18:02:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ababiichuk@apache.org To: commits@ambari.apache.org Date: Tue, 22 Aug 2017 18:02:18 -0000 Message-Id: In-Reply-To: <1d34770c8fa44a6fa9a08c85faa49607@git.apache.org> References: <1d34770c8fa44a6fa9a08c85faa49607@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/35] ambari git commit: AMBARI-21744. package_regex in get_package_from_available() can match wrong pkg (dlysnichenko) 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/f2cc609b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f2cc609b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f2cc609b Branch: refs/heads/branch-feature-logsearch-ui Commit: f2cc609b0033d59130cb00d14ff8d2c8db6e1392 Parents: 8c5b03b Author: Lisnichenko Dmitro Authored: Thu Aug 17 18:04:09 2017 +0300 Committer: Lisnichenko Dmitro Committed: Thu Aug 17 18:05:12 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/f2cc609b/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 90337f4..6e26d99 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 @@ -473,6 +473,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