View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012556 | CMake | CPack | public | 2011-11-03 18:07 | 2012-03-27 02:26 | ||||
Reporter | Chip Christian | ||||||||
Assigned To | Eric NOULARD | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | x86_64 | OS | RHEL | OS Version | 6.0 | ||||
Product Version | CMake 2.8.6 | ||||||||
Target Version | CMake 2.8.7 | Fixed in Version | CMake 2.8.7 | ||||||
Summary | 0012556: CPackRPM: pre/post-install/uninstall scripts leak from one COMPONENT to the next | ||||||||
Description | I have 4 COMPONENTS. One of them needs a pre-uninstall and a post-install script Once the scripts are referenced all subsequent COMPONENTS get stuck with the same scripts. | ||||||||
Steps To Reproduce | SET(CPACK_COMPONENTS_ALL libraries devel internal perl) SET(CPACK_RPM_libraries_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/rpm/pre-uninstall) SET(CPACK_RPM_libraries_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/rpm/post-install) SET(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}-${ARCHITECTURE}) | ||||||||
Additional Information | To fix, apply this patch: --- /usr/share/cmake/Modules/CPackRPM.cmake 2011-10-04 11:09:24.000000000 -0500 +++ cmake/CPackRPM.cmake 2011-11-03 09:59:36.216592884 -0500 @@ -421,6 +421,8 @@ # The refered script file(s) will be read and directly # put after the %post or %postun section if(CPACK_RPM_PACKAGE_COMPONENT) + set(CPACK_RPM_SPEC_POSTUNINSTALL "") + set(CPACK_RPM_SPEC_POSTINSTALL "") if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_INSTALL_SCRIPT_FILE) set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_INSTALL_SCRIPT_FILE}) else() @@ -457,6 +459,8 @@ # The refered script file(s) will be read and directly # put after the %pre or %preun section if(CPACK_RPM_PACKAGE_COMPONENT) + set(CPACK_RPM_SPEC_PREUNINSTALL "") + set(CPACK_RPM_SPEC_PREINSTALL "") if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE) set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE}) else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE) | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0027721) Eric NOULARD (developer) 2011-11-03 18:13 |
Thank for digging this out, patch seems reasonable; I'll look into this rapidly. Tomorrow or this WE most probably. |
(0027730) Eric NOULARD (developer) 2011-11-05 06:46 |
Hi Chip, I did just push a modified equivalent of your patch to next. Fetching upstream next Merge topic 'CPackRPM-fix12556' into next 9066886 CPackRPM fix 0012556 and enhance documentation |
(0028976) Eric NOULARD (developer) 2012-03-27 02:26 |
Included in 2.8.7 |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-11-03 18:07 | Chip Christian | New Issue | |
2011-11-03 18:10 | Eric NOULARD | Assigned To | => Eric NOULARD |
2011-11-03 18:10 | Eric NOULARD | Status | new => assigned |
2011-11-03 18:13 | Eric NOULARD | Note Added: 0027721 | |
2011-11-05 06:46 | Eric NOULARD | Target Version | => CMake 2.8.7 |
2011-11-05 06:46 | Eric NOULARD | Note Added: 0027730 | |
2011-11-05 06:46 | Eric NOULARD | Status | assigned => resolved |
2011-11-05 06:46 | Eric NOULARD | Fixed in Version | => CMake 2.8.7 |
2011-11-05 06:46 | Eric NOULARD | Resolution | open => fixed |
2012-03-27 02:26 | Eric NOULARD | Note Added: 0028976 | |
2012-03-27 02:26 | Eric NOULARD | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |