mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
CPack: correctly perform querytags on old versions of RPM
In some versions of RPM, e.g. 4.0.4, rpmbuild does not understand --querytags parameter, but rpm does. Such behavior was found on Alt Linux P10 and Alt Linux Sisyphus (e2k).
This commit is contained in:
@@ -1088,7 +1088,17 @@ function(cpack_rpm_generate_package)
|
||||
execute_process(
|
||||
COMMAND "${RPMBUILD_EXECUTABLE}" --querytags
|
||||
OUTPUT_VARIABLE RPMBUILD_TAG_LIST
|
||||
RESULT_VARIABLE RPMBUILD_QUERYTAGS_SUCCESS
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# In some versions of RPM, rpmbuild does not understand --querytags parameter,
|
||||
# but rpm does.
|
||||
if(NOT RPMBUILD_QUERYTAGS_SUCCESS EQUAL 0)
|
||||
execute_process(
|
||||
COMMAND "${RPM_EXECUTABLE}" --querytags
|
||||
OUTPUT_VARIABLE RPMBUILD_TAG_LIST
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
string(REPLACE "\n" ";" RPMBUILD_TAG_LIST "${RPMBUILD_TAG_LIST}")
|
||||
|
||||
# In some versions of RPM, weak dependency tags are present in the --querytags
|
||||
|
||||
Reference in New Issue
Block a user