[Cmake-commits] CMake branch, next, updated. v3.6.1-1808-gb1590ed

Brad King brad.king at kitware.com
Tue Sep 6 08:55:33 EDT 2016


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  b1590ed97f354ba39106a56656fd5829395a0fdf (commit)
       via  13ecb9960b84fe12059630e8e677eff6ee9f1715 (commit)
      from  85ce7bb6a15ad2d2b13635c04806ed62b2a1c32e (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1590ed97f354ba39106a56656fd5829395a0fdf
commit b1590ed97f354ba39106a56656fd5829395a0fdf
Merge: 85ce7bb 13ecb99
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 6 08:55:32 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 6 08:55:32 2016 -0400

    Merge topic 'cpack-deb-package-description-fallback' into next
    
    13ecb996 Revert topic 'cpack-deb-package-description-fallback'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=13ecb9960b84fe12059630e8e677eff6ee9f1715
commit 13ecb9960b84fe12059630e8e677eff6ee9f1715
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 6 08:55:15 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 6 08:55:15 2016 -0400

    Revert topic 'cpack-deb-package-description-fallback'

diff --git a/Help/release/dev/cpack-deb-package-description-fallback b/Help/release/dev/cpack-deb-package-description-fallback
deleted file mode 100644
index 6300dfc..0000000
--- a/Help/release/dev/cpack-deb-package-description-fallback
+++ /dev/null
@@ -1,11 +0,0 @@
-cpack-deb-package-description-fallback
---------------------------------------
-
-* The :module:`CPackDeb` module learned new package description
-  override rules to match :module:`CPackRPM` module behavior.
-  **Breaking change**: If :variable:`CPACK_PACKAGE_DESCRIPTION_FILE`
-  variable is set to non default location then it is prefered to
-  :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable.
-  Also a new :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_DESCRIPTION`
-  was introduced for component based packaging.
-  See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`.
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 25c25ae..c9678d6 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -156,19 +156,16 @@
 #  * Default   : :code:`CPACK_PACKAGE_CONTACT`
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
-#               CPACK_DEBIAN_<COMPONENT>_PACKAGE_DESCRIPTION
+#               CPACK_COMPONENT_<COMPONENT>_DESCRIPTION
 #
 #  The Debian package description
 #
 #  * Mandatory : YES
 #  * Default   :
 #
-#    - :variable:`CPACK_COMPONENT_<COMPONENT>_DESCRIPTION` (component
-#       based installers only) if set,
-#    - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default location,
-#    - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set,
-#    - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set,
-#    - or "no package description available"
+#    - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or
+#    - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
+#
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
 #               CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION
@@ -814,23 +811,24 @@ function(cpack_deb_prepare_package_vars)
   endif()
 
   # Description: (mandatory)
-  if(CPACK_DEB_PACKAGE_COMPONENT)
-    if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION)
-      set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}")
-    elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
-      set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}")
+  if(NOT CPACK_DEB_PACKAGE_COMPONENT)
+    if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
+      if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+        message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION")
+      endif()
+      set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
     endif()
-  endif()
-
-  if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-    if(CPACK_PACKAGE_DESCRIPTION_FILE AND NOT "${CPACK_PACKAGE_DESCRIPTION_FILE}" STREQUAL "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt")
-      file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-    elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY)
-      set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
-    elseif(CPACK_PACKAGE_DESCRIPTION_FILE) # use default package description file content
-      file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-    else()
-      set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "no package description available")
+  else()
+    set(component_description_var CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
+
+    # component description overrides package description
+    if(${component_description_var})
+      set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}})
+    elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
+      if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+        message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION or ${component_description_var}")
+      endif()
+      set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
     endif()
   endif()
 
diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in
index 6c5a655..74d816c 100644
--- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in
+++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in
@@ -15,8 +15,8 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
 #set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
 
 # overriding previous descriptions
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY               "main description")
-set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_DESCRIPTION   "applications_description")
-set(CPACK_COMPONENT_HEADERS_DESCRIPTION             "headers_description")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY           "main description")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION    "applications_description")
+set(CPACK_COMPONENT_HEADERS_DESCRIPTION         "headers_description")
 # libraries does not have any description and should inherit from CPACK_PACKAGE_DESCRIPTION_SUMMARY
 unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION)
diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in
index 92226d8..cda79bc 100644
--- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in
+++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in
@@ -17,12 +17,10 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
 # overriding previous descriptions
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY           "main description 2")
 
-# and override CPACK_PACKAGE_DESCRIPTION_SUMMARY because of precedence
-set(CPACK_PACKAGE_DESCRIPTION_FILE
-  "@CPackComponentsDEB_SOURCE_DIR@/pkg_description.txt")
-
 # Components do not have any description
 unset(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION)
 unset(CPACK_COMPONENT_HEADERS_DESCRIPTION)
+unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION)
+
 
 set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION       "library description")
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake
index 7b94ca0..35ca74c 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake
@@ -55,12 +55,12 @@ if(DPKGDEB_EXECUTABLE)
     message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'")
 
     if("${dpkg_package_name}" STREQUAL "mylib-applications")
-      if(NOT "${dpkg_description}" STREQUAL "Debian package description file")
+      if(NOT "${dpkg_description}" STREQUAL "main description 2")
         set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
                                       "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != applications_description")
       endif()
     elseif("${dpkg_package_name}" STREQUAL "mylib-headers")
-      if(NOT "${dpkg_description}" STREQUAL "Debian package description file")
+      if(NOT "${dpkg_description}" STREQUAL "main description 2")
         set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
                                       "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != headers_description")
       endif()
diff --git a/Tests/CPackComponentsDEB/pkg_description.txt b/Tests/CPackComponentsDEB/pkg_description.txt
deleted file mode 100644
index 99f8f9b..0000000
--- a/Tests/CPackComponentsDEB/pkg_description.txt
+++ /dev/null
@@ -1 +0,0 @@
-Debian package description file

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

Summary of changes:
 .../dev/cpack-deb-package-description-fallback     |   11 -----
 Modules/CPackDeb.cmake                             |   44 ++++++++++----------
 ...LibCPackConfig-components-description1.cmake.in |    6 +--
 ...LibCPackConfig-components-description2.cmake.in |    6 +--
 ...CPackVerifyResult-components-description2.cmake |    4 +-
 Tests/CPackComponentsDEB/pkg_description.txt       |    1 -
 6 files changed, 28 insertions(+), 44 deletions(-)
 delete mode 100644 Help/release/dev/cpack-deb-package-description-fallback
 delete mode 100644 Tests/CPackComponentsDEB/pkg_description.txt


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list