diff options
author | Brad King <brad.king@kitware.com> | 2020-05-28 10:50:32 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-05-28 10:50:40 (GMT) |
commit | 1b8b98a8849377d1dfc3015eb9f4f79fd14dba96 (patch) | |
tree | d9da12d352744c4282d7ab51d026eae3d34a80af /Modules | |
parent | 6fce0cbcab97cab1d190ccd915153fcfd156df5e (diff) | |
parent | 6ba842163c9060f15156627c19b77aa7fd9838cd (diff) | |
download | CMake-1b8b98a8849377d1dfc3015eb9f4f79fd14dba96.zip CMake-1b8b98a8849377d1dfc3015eb9f4f79fd14dba96.tar.gz CMake-1b8b98a8849377d1dfc3015eb9f4f79fd14dba96.tar.bz2 |
Merge topic 'fix-cpack-deb-generating-empty-paragraph' into release-3.17
6ba842163c CPack-deb: don't add a line with a dot to pkg desc
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4806
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Internal/CPack/CPackDeb.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake index 14bb104..db35e3a 100644 --- a/Modules/Internal/CPack/CPackDeb.cmake +++ b/Modules/Internal/CPack/CPackDeb.cmake @@ -83,6 +83,16 @@ function(cpack_deb_format_package_description TEXT OUTPUT_VAR) string(REPLACE "\n" ";" _lines "${_text}") list(POP_FRONT _lines _summary) + # If the description ends with a newline (e.g. typically if it was read + # from a file) the last line will be empty. We drop it here, otherwise + # it would be replaced by a `.` which would lead to the package violating + # the extended-description-contains-empty-paragraph debian policy + list(POP_BACK _lines _last_line) + string(STRIP "${_last_line}" _last_line_strip) + if(_last_line_strip) + list(APPEND _lines "${_last_line_strip}") + endif() + # Check if reformatting required cpack_deb_check_description("${_summary}" "${_lines}" _result) if(_result) |