mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 07:11:05 -06:00
Merge topic 'cpack-rpm-dist-test-fix'
9ce00cae CPack/RPM: DIST-MONOLITHIC-type subtest fix
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1424
This commit is contained in:
@@ -5,6 +5,11 @@ execute_process(COMMAND ${RPMBUILD_EXECUTABLE} -E %{?dist}
|
||||
|
||||
set(whitespaces_ "[\t\n\r ]*")
|
||||
|
||||
# since we have no control over dist tag value we should try to escape
|
||||
# the content for use as a regular expression
|
||||
string(REPLACE "+" "\\+" DIST_TAG "${DIST_TAG}")
|
||||
string(REPLACE "." "\\." DIST_TAG "${DIST_TAG}")
|
||||
|
||||
getPackageInfo("${FOUND_FILE_1}" "FILE_INFO_")
|
||||
if(NOT FILE_INFO_ MATCHES ".*Release${whitespaces_}:${whitespaces_}1${DIST_TAG}")
|
||||
message(FATAL_ERROR "Unexpected Release in '${FOUND_FILE_1}'; file info: '${FILE_INFO_}'")
|
||||
|
||||
Reference in New Issue
Block a user