CPack/Deb prevent accidental component dependencies
Prevent accidental inter component dependency setting since this is a breaking feature in situations where another CPack module is already using the feature. It should be enabled if desired since it can cause issues when upgrading only one of the components for e.g. configuration instead of all the components at once.
This commit is contained in:
parent
c75d91a05c
commit
4f3b97063f
|
@ -11,7 +11,8 @@ cpack-deb-imporvements
|
||||||
* The :module:`CPackDeb` module learned how to generate dependencies between
|
* The :module:`CPackDeb` module learned how to generate dependencies between
|
||||||
Debian packages if multi-component setup is used and
|
Debian packages if multi-component setup is used and
|
||||||
:variable:`CPACK_COMPONENT_<compName>_DEPENDS` variables are set.
|
:variable:`CPACK_COMPONENT_<compName>_DEPENDS` variables are set.
|
||||||
This breaks compatibility with previous versions.
|
For backward compatibility this feature is disabled by default. See
|
||||||
|
:variable:`CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS`.
|
||||||
|
|
||||||
* The :module:`CPackDeb` module learned how to set the package release number
|
* The :module:`CPackDeb` module learned how to set the package release number
|
||||||
(``DebianRevisionNumber`` in package file name). See
|
(``DebianRevisionNumber`` in package file name). See
|
||||||
|
|
|
@ -100,6 +100,13 @@
|
||||||
#
|
#
|
||||||
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)")
|
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)")
|
||||||
#
|
#
|
||||||
|
# .. variable:: CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS
|
||||||
|
#
|
||||||
|
# Sets inter component dependencies if listed with
|
||||||
|
# :variable:`CPACK_COMPONENT_<compName>_DEPENDS` variables.
|
||||||
|
#
|
||||||
|
# * Mandatory : NO
|
||||||
|
# * Default : -
|
||||||
#
|
#
|
||||||
# .. variable:: CPACK_DEBIAN_PACKAGE_MAINTAINER
|
# .. variable:: CPACK_DEBIAN_PACKAGE_MAINTAINER
|
||||||
#
|
#
|
||||||
|
@ -713,6 +720,8 @@ function(cpack_deb_prepare_package_vars)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
if(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS)
|
||||||
set(COMPONENT_DEPENDS "")
|
set(COMPONENT_DEPENDS "")
|
||||||
foreach (_PACK ${CPACK_COMPONENT_${_local_component_name}_DEPENDS})
|
foreach (_PACK ${CPACK_COMPONENT_${_local_component_name}_DEPENDS})
|
||||||
get_component_package_name(_PACK_NAME "${_PACK}")
|
get_component_package_name(_PACK_NAME "${_PACK}")
|
||||||
|
@ -730,6 +739,7 @@ function(cpack_deb_prepare_package_vars)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# at this point, the CPACK_DEBIAN_PACKAGE_DEPENDS is properly set
|
# at this point, the CPACK_DEBIAN_PACKAGE_DEPENDS is properly set
|
||||||
# to the minimal dependency of the package
|
# to the minimal dependency of the package
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
if(CPACK_GENERATOR MATCHES "DEB")
|
if(CPACK_GENERATOR MATCHES "DEB")
|
||||||
set(CPACK_DEB_COMPONENT_INSTALL "ON")
|
set(CPACK_DEB_COMPONENT_INSTALL "ON")
|
||||||
|
set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS "ON")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
if(CPACK_GENERATOR MATCHES "DEB")
|
if(CPACK_GENERATOR MATCHES "DEB")
|
||||||
set(CPACK_DEB_COMPONENT_INSTALL "ON")
|
set(CPACK_DEB_COMPONENT_INSTALL "ON")
|
||||||
|
set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS "ON")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue