masatana commented on a change in pull request #656:
URL: https://github.com/apache/bigtop/pull/656#discussion_r463315391
##########
File path: bigtop-packages/src/common/ambari/patch4-AMBARI-CentOS8.diff
##########
@@ -0,0 +1,59 @@
+diff --git a/ambari-agent/src/main/package/dependencies.properties
b/ambari-agent/src/main/package/dependencies.properties
+index 07b0b68319..9cfc2daeb5 100644
+--- a/ambari-agent/src/main/package/dependencies.properties
++++ b/ambari-agent/src/main/package/dependencies.properties
+@@ -28,5 +28,5 @@
+ # Such a format is respected by install_ambari_tarball.py by default,
+ # however should be encouraged manually in pom.xml.
+
+-rpm.dependency.list=openssl,\nRequires: rpm-python,\nRequires:
zlib,\nRequires: python >= 2.6
+-deb.dependency.list=openssl, zlibc, python (>= 2.6)
+\ No newline at end of file
++rpm.dependency.list=openssl,\nRequires: zlib,\nRequires: python2 >= 2.6
++deb.dependency.list=openssl, zlibc, python (>= 2.6)
+diff --git
a/ambari-common/src/main/python/resource_management/core/providers/package/__init__.py
b/ambari-common/src/main/python/resource_management/core/providers/package/__init__.py
+index 799cf3eed0..ade58292cb 100644
+---
a/ambari-common/src/main/python/resource_management/core/providers/package/__init__.py
++++
b/ambari-common/src/main/python/resource_management/core/providers/package/__init__.py
+@@ -359,9 +359,8 @@ class RPMBasedPackageProvider(PackageProvider):
+ INSTALLED_PACKAGE_VERSION_COMMAND = "rpm -q --queryformat
'%{{version}}-%{{release}}' \"{0}\""
+
+ def rpm_check_package_available(self, name):
+- import rpm # this is faster then calling 'rpm'-binary externally.
+- ts = rpm.TransactionSet()
+- packages = ts.dbMatch()
++ import os
++ packages = os.popen("rpm -qa --queryformat '%{name} '").read().split()
Review comment:
+1. Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]