[Cmake-commits] CMake branch, next, updated. v2.8.2-1107-gaa3a813

Eric Noulard eric.noulard at gmail.com
Mon Oct 25 14:43:54 EDT 2010


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  aa3a813805ab22c0b64350f74f6e48d021748039 (commit)
       via  a74972402910610ab3ab62066d6b9e65b5202078 (commit)
      from  57ec8e41cfbc197df5e65018c4e8a37bcc6d37e8 (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=aa3a813805ab22c0b64350f74f6e48d021748039
commit aa3a813805ab22c0b64350f74f6e48d021748039
Merge: 57ec8e4 a749724
Author:     Eric Noulard <eric.noulard at gmail.com>
AuthorDate: Mon Oct 25 14:43:44 2010 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Oct 25 14:43:44 2010 -0400

    Merge topic 'CPackDeb-MoreControl' into next
    
    a749724 CPackDeb Added several optional debian binary package fields


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a74972402910610ab3ab62066d6b9e65b5202078
commit a74972402910610ab3ab62066d6b9e65b5202078
Author:     Eric NOULARD <eric.noulard at gmail.com>
AuthorDate: Mon Oct 25 20:40:45 2010 +0200
Commit:     Eric NOULARD <eric.noulard at gmail.com>
CommitDate: Mon Oct 25 20:40:45 2010 +0200

    CPackDeb Added several optional debian binary package fields
    
    This fixes bugs #0011355  and 0008342.
    The merged patch is a contribution from Michael Lasmanis and Petri Hodju
    with some extra documentation added by the merger.

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 07d6ff9..98d40d6 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -62,7 +62,43 @@
 #     Default   : -
 #     May be set when invoking cpack in order to trace debug informations
 #     during CPackDeb run.
-
+# CPACK_DEBIAN_PACKAGE_PREDEPENDS
+#     Mandatory : NO
+#     Default   : -
+#     see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+#     This field is like Depends, except that it also forces dpkg to complete installation of
+#     the packages named before even starting the installation of the package which declares
+#     the pre-dependency.
+# CPACK_DEBIAN_PACKAGE_ENHANCES
+#     Mandatory : NO
+#     Default   : -
+#     see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+#     This field is similar to Suggests but works in the opposite direction.
+#     It is used to declare that a package can enhance the functionality of another package.
+# CPACK_DEBIAN_PACKAGE_BREAKS
+#     Mandatory : NO
+#     Default   : -
+#     see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+#     When one binary package declares that it breaks another, dpkg will refuse to allow the
+#     package which declares Breaks be installed unless the broken package is deconfigured first,
+#     and it will refuse to allow the broken package to be reconfigured.
+# CPACK_DEBIAN_PACKAGE_CONFLICTS
+#     Mandatory : NO
+#     Default   : -
+#     see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+#     When one binary package declares a conflict with another using a Conflicts field,
+#     dpkg will refuse to allow them to be installed on the system at the same time.
+# CPACK_DEBIAN_PACKAGE_PROVIDES
+#     Mandatory : NO
+#     Default   : -
+#     see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+#     A virtual package is one which appears in the Provides control field of another package.
+# CPACK_DEBIAN_PACKAGE_REPLACES
+#     Mandatory : NO
+#     Default   : -
+#     see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
+#     Packages can declare in their control file that they should overwrite
+#     files in certain other packages, or completely replace other packages.
 
 #=============================================================================
 # Copyright 2007-2009 Kitware, Inc.
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index ac2e151..47a1ff6 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -94,6 +94,18 @@ int cmCPackDebGenerator::PackageFiles()
                               this->GetOption("CPACK_DEBIAN_PACKAGE_SUGGESTS");
   const char* debian_pkg_url =
                               this->GetOption("CPACK_DEBIAN_PACKAGE_HOMEPAGE");
+  const char* debian_pkg_predep =
+                    this->GetOption("CPACK_DEBIAN_PACKAGE_PREDEPENDS");
+  const char* debian_pkg_enhances =
+                    this->GetOption("CPACK_DEBIAN_PACKAGE_ENHANCES");
+  const char* debian_pkg_breaks =
+                    this->GetOption("CPACK_DEBIAN_PACKAGE_BREAKS");
+  const char* debian_pkg_conflicts =
+                    this->GetOption("CPACK_DEBIAN_PACKAGE_CONFLICTS");
+  const char* debian_pkg_provides =
+                    this->GetOption("CPACK_DEBIAN_PACKAGE_PROVIDES");
+  const char* debian_pkg_replaces =
+                    this->GetOption("CPACK_DEBIAN_PACKAGE_REPLACES");
 
     { // the scope is needed for cmGeneratedFileStream
     cmGeneratedFileStream out(ctlfilename.c_str());
@@ -102,22 +114,46 @@ int cmCPackDebGenerator::PackageFiles()
     out << "Section: " << debian_pkg_section << "\n";
     out << "Priority: " << debian_pkg_priority << "\n";
     out << "Architecture: " << debian_pkg_arch << "\n";
-    if(debian_pkg_dep)
+    if(debian_pkg_dep && *debian_pkg_dep)
       {
       out << "Depends: " << debian_pkg_dep << "\n";
       }
-    if(debian_pkg_rec)
+    if(debian_pkg_rec && *debian_pkg_rec)
       {
       out << "Recommends: " << debian_pkg_rec << "\n";
       }
-    if(debian_pkg_sug)
+    if(debian_pkg_sug && *debian_pkg_sug)
       {
       out << "Suggests: " << debian_pkg_sug << "\n";
       }
-    if(debian_pkg_url)
+    if(debian_pkg_url && *debian_pkg_url)
       {
       out << "Homepage: " << debian_pkg_url << "\n";
       }
+    if (debian_pkg_predep && *debian_pkg_predep)
+      {
+      out << "Pre-Depends: " << debian_pkg_predep << "\n";
+      }
+    if (debian_pkg_enhances && *debian_pkg_enhances)
+      {
+      out << "Enhances: " << debian_pkg_enhances << "\n";
+      }
+    if (debian_pkg_breaks && *debian_pkg_breaks)
+      {
+      out << "Breaks: " << debian_pkg_breaks << "\n";
+      }
+    if (debian_pkg_conflicts && *debian_pkg_conflicts)
+      {
+      out << "Conflicts: " << debian_pkg_conflicts << "\n";
+      }
+    if (debian_pkg_provides && *debian_pkg_provides)
+      {
+      out << "Provides: " << debian_pkg_provides << "\n";
+      }
+    if (debian_pkg_replaces && *debian_pkg_replaces)
+      {
+      out << "Replaces: " << debian_pkg_replaces << "\n";
+      }
     unsigned long totalSize = 0;
     {
       std::string dirName = this->GetOption("CPACK_TEMPORARY_DIRECTORY");

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

Summary of changes:
 Modules/CPackDeb.cmake               |   38 ++++++++++++++++++++++++++++-
 Source/CPack/cmCPackDebGenerator.cxx |   44 ++++++++++++++++++++++++++++++---
 2 files changed, 77 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list