[Cmake-commits] CMake branch, next, updated. v2.8.7-2095-gec9d401

Eric Noulard eric.noulard at gmail.com
Fri Jan 13 15:40:33 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  ec9d4011a86b18e807aaca65f9a1a93a92ef8c96 (commit)
       via  ae250d5cfa0daec74935e6aa484fa439f3a6dd23 (commit)
      from  3eb481524b5c7e4fdbd668431576ff912756e226 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec9d4011a86b18e807aaca65f9a1a93a92ef8c96
commit ec9d4011a86b18e807aaca65f9a1a93a92ef8c96
Merge: 3eb4815 ae250d5
Author:     Eric Noulard <eric.noulard at gmail.com>
AuthorDate: Fri Jan 13 15:40:26 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 13 15:40:26 2012 -0500

    Merge topic 'CPackRPM-noFileListedTwice' into next
    
    ae250d5 CPackRPM flag direcories with %dir in the generated spec file


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae250d5cfa0daec74935e6aa484fa439f3a6dd23
commit ae250d5cfa0daec74935e6aa484fa439f3a6dd23
Author:     Deborah Pickett <deborah.pickett at autodesk.com>
AuthorDate: Fri Jan 13 21:35:41 2012 +0100
Commit:     Eric NOULARD <eric.noulard at gmail.com>
CommitDate: Fri Jan 13 21:35:41 2012 +0100

    CPackRPM flag direcories with %dir in the generated spec file
    
    This fix bug #12863 whose symptom was a lot of "warning: File listed twice"
    printed out by rpmbuild when processing the spec file.
    
    Signed-off-by: Eric NOULARD <eric.noulard at gmail.com>

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index bf476ad..e1e76ed 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -714,6 +714,25 @@ else()
   set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "")
 endif(CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
 
+# Prepend directories in ${CPACK_RPM_INSTALL_FILES} with %dir
+# This is necessary to avoid duplicate files since rpmbuild do
+# recursion on its own when encountering a pathname which is a directory
+# which is not flagged as %dir
+string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST)
+string(REPLACE "\n" ";" CPACK_RPM_INSTALL_FILES_LIST
+                        "${CPACK_RPM_INSTALL_FILES_LIST}")
+string(REPLACE "\"" "" CPACK_RPM_INSTALL_FILES_LIST
+                        "${CPACK_RPM_INSTALL_FILES_LIST}")
+set(CPACK_RPM_INSTALL_FILES "")
+foreach(F IN LISTS CPACK_RPM_INSTALL_FILES_LIST)
+  if(IS_DIRECTORY "${WDIR}/${F}")
+    set(CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES}%dir \"${F}\"\n")
+  else()
+    set(CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES}\"${F}\"\n")
+  endif()
+endforeach(F)
+set(CPACK_RPM_INSTALL_FILES_LIST "")
+
 # The name of the final spec file to be used by rpmbuild
 SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec")
 

-----------------------------------------------------------------------

Summary of changes:
 Modules/CPackRPM.cmake |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list