You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by lp...@apache.org on 2017/08/22 11:47:46 UTC
[18/51] [abbrv] 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/feature-branch-AMBARI-21307
Commit: f2cc609b0033d59130cb00d14ff8d2c8db6e1392
Parents: 8c5b03b
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Thu Aug 17 18:04:09 2017 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
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