mirror of
https://github.com/reactos/CMake.git
synced 2024-11-29 06:20:23 +00:00
CPackRPM: Unset temporary component variables before re-use
Improve the fix from commit v2.8.9~136^2 (CPackRPM: avoid leakage of RPM directive from one component to another, 2012-06-05) to clean up more temporary variables. Reviewed-by: Domen Vrankar <domen.vrankar@gmail.com>
This commit is contained in:
parent
3609fceee7
commit
51a60973eb
@ -678,6 +678,8 @@ foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Do not forget to unset previously set header (from previous component)
|
||||
unset(TMP_RPM_${_RPM_SPEC_HEADER})
|
||||
# Treat the RPM Spec keyword iff it has been properly defined
|
||||
if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
|
||||
# Transform NAME --> Name e.g. PROVIDES --> Provides
|
||||
@ -698,9 +700,7 @@ foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
|
||||
message("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
|
||||
endif()
|
||||
set(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
|
||||
else()
|
||||
# Do not forget to unset previously set header (from previous component)
|
||||
unset(TMP_RPM_${_RPM_SPEC_HEADER})
|
||||
unset(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user