diff options
author | Eric NOULARD <eric.noulard@gmail.com> | 2012-08-14 17:39:49 (GMT) |
---|---|---|
committer | Eric NOULARD <eric.noulard@gmail.com> | 2012-09-10 20:35:02 (GMT) |
commit | d8a1dd5865a86a719420ef80797732dfefff0258 (patch) | |
tree | 0f97c2f7038a9f5cf84c111c3e5bfdc2ed32a2b0 /Modules/CPackRPM.cmake | |
parent | 4e20ca7726269e2403fa9e18c316fb6c65391b44 (diff) | |
download | CMake-d8a1dd5865a86a719420ef80797732dfefff0258.zip CMake-d8a1dd5865a86a719420ef80797732dfefff0258.tar.gz CMake-d8a1dd5865a86a719420ef80797732dfefff0258.tar.bz2 |
Handles %attr(nnn,-,-) /path/to/file in CPACK_RPM_USER_FILELIST properly.
This triggered an unknown secondary bug when there is
no ABSOLUTE INSTALL file. This is fixed as well.
This is based on a fix of bug #0013468 from Viktor Dubrovsky.
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r-- | Modules/CPackRPM.cmake | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index b5826ef..0cec897 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -728,18 +728,24 @@ if(CPACK_RPM_USER_FILELIST_INTERNAL) set(CPACK_RPM_USER_INSTALL_FILES "") foreach(F IN LISTS CPACK_RPM_USER_FILELIST_INTERNAL) - string(REGEX REPLACE "%[A-Za-z\(\)]* " "" F_PATH ${F}) - string(REGEX MATCH "%[A-Za-z\(\)]*" F_PREFIX ${F}) + string(REGEX REPLACE "%[A-Za-z0-9\(\),-]* " "" F_PATH ${F}) + string(REGEX MATCH "%[A-Za-z0-9\(\),-]*" F_PREFIX ${F}) + if(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: F_PREFIX=<${F_PREFIX}>, F_PATH=<${F_PATH}>") + endif() if(F_PREFIX) - set(F_PREFIX "${F_PREFIX} ") + set(F_PREFIX "${F_PREFIX} ") endif() # Rebuild the user list file set(CPACK_RPM_USER_INSTALL_FILES "${CPACK_RPM_USER_INSTALL_FILES}${F_PREFIX}\"${F_PATH}\"\n") # Remove from CPACK_RPM_INSTALL_FILES and CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${F_PATH}) - list(REMOVE_ITEM CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL ${F_PATH}) + # ABSOLUTE destination files list may not exists at all + if (CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL) + list(REMOVE_ITEM CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL ${F_PATH}) + endif() endforeach() |