Repository: ambari Updated Branches: refs/heads/branch-2.6 ec6a714f3 -> aa4807ca3
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-2.6 Commit: aa4807ca3a850d3275b11c9ee41a0cb6c5328b9c Parents: ec6a714 Author: Lisnichenko Dmitro <dlysniche...@hortonworks.com> Authored: Thu Aug 17 18:04:09 2017 +0300 Committer: Lisnichenko Dmitro <dlysniche...@hortonworks.com> 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