diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2017-03-23 22:36:47 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2017-03-24 18:52:02 (GMT) |
commit | 6c09c5d64cad9c7d1c6be414ce918ac2d090b864 (patch) | |
tree | 98c2f8b920b34e1bfe6c0a0290c615728afa2aa1 | |
parent | f0f60c548a3c3156f6488c1921f5b64ea33f5410 (diff) | |
download | CMake-6c09c5d64cad9c7d1c6be414ce918ac2d090b864.zip CMake-6c09c5d64cad9c7d1c6be414ce918ac2d090b864.tar.gz CMake-6c09c5d64cad9c7d1c6be414ce918ac2d090b864.tar.bz2 |
CPack/RPM honor package file name on debuginfo enabled
Packages with debuginfo enabled should
still honor defined package file name
if file name is not set to RPM-DEFAULT.
Fixes #16715
-rw-r--r-- | Modules/CPackRPM.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake | 5 |
3 files changed, 12 insertions, 4 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 2e69195..a81719e 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -2648,8 +2648,8 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT unset(expected_filenames_) unset(filenames_) if(CPACK_RPM_DEBUGINFO_PACKAGE AND NOT CPACK_RPM_FILE_NAME STREQUAL "RPM-DEFAULT") - string(TOLOWER "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm" efn_) - list(APPEND expected_filenames_ "${efn_}") + list(APPEND expected_filenames_ + "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm") list(APPEND filenames_ "${CPACK_RPM_FILE_NAME}") endif() diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake index 06e56d3..2948a1b 100644 --- a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake @@ -3,14 +3,17 @@ set(whitespaces_ "[\t\n\r ]*") set(EXPECTED_FILES_COUNT "5") set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) +set(EXPECTED_FILE_1_NAME "Debuginfo") set(EXPECTED_FILE_1_COMPONENT "applications") set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/test_prog") -set(EXPECTED_FILE_2 "debuginfo*-headers.rpm") +set(EXPECTED_FILE_2 "TestDinfo-pkg*-headers.rpm") set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") -set(EXPECTED_FILE_3 "debuginfo*-libs.rpm") +set(EXPECTED_FILE_3 "TestDinfo-pkg*-libs.rpm") set(EXPECTED_FILE_CONTENT_3_LIST "/usr;/usr/bas;/usr/bas/libtest_lib.so") +set(EXPECTED_FILE_4_NAME "Debuginfo") set(EXPECTED_FILE_4_COMPONENT "applications-debuginfo") set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +set(EXPECTED_FILE_5_NAME "Debuginfo") set(EXPECTED_FILE_5_COMPONENT "libs-debuginfo") set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*") diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake index 0642d83..cfae259 100644 --- a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake @@ -25,6 +25,11 @@ install(TARGETS test_lib DESTINATION bas COMPONENT libs) set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT") set(CPACK_RPM_APPLICATIONS_DEBUGINFO_PACKAGE ON) + +# test that components with debuginfo enabled still honor +# CPACK_PACKAGE_FILE_NAME setting +set(CPACK_RPM_PACKAGE_NAME "Debuginfo") +set(CPACK_PACKAGE_FILE_NAME "TestDinfo-pkg") set(CPACK_RPM_LIBS_DEBUGINFO_PACKAGE ON) set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/src") |