From d0eb89c17b86dd583d315b15b8ca71e32561f49a Mon Sep 17 00:00:00 2001 From: Eric NOULARD Date: Mon, 29 Nov 2010 18:57:24 +0100 Subject: CPack backward compatibility fix 2.8.3-2.8.2 (bug 11452) One should set CPACK_ARCHIVE_COMPONENT_INSTALL=1 in order to trigger component install for ARCHIVE generators --- Source/CPack/cmCPackArchiveGenerator.cxx | 44 ++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 424c1a0..8bbf699 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -228,21 +228,23 @@ int cmCPackArchiveGenerator::PackageFiles() PrepareGroupingKind(); - // CASE 1 : COMPONENT ALL-IN-ONE package - // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested - // then the package file is unique and should be open here. - if (allComponentInOne || (allGroupInOne && (!this->ComponentGroups.empty()))) - { - return PackageComponentsAllInOne(allComponentInOne); - } - // CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one) - // There will be 1 package for each component group - // however one may require to ignore component group and - // in this case you'll get 1 package for each component. - else if ((!this->ComponentGroups.empty()) || (ignoreComponentGroup)) - { - return PackageComponents(ignoreComponentGroup); - } + if (SupportsComponentInstallation()) { + // CASE 1 : COMPONENT ALL-IN-ONE package + // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested + // then the package file is unique and should be open here. + if (allComponentInOne || (allGroupInOne && (!this->ComponentGroups.empty()))) + { + return PackageComponentsAllInOne(allComponentInOne); + } + // CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one) + // There will be 1 package for each component group + // however one may require to ignore component group and + // in this case you'll get 1 package for each component. + else if ((!this->ComponentGroups.empty()) || (ignoreComponentGroup)) + { + return PackageComponents(ignoreComponentGroup); + } + } // CASE 3 : NON COMPONENT package. DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive); @@ -278,5 +280,15 @@ int cmCPackArchiveGenerator::GenerateHeader(std::ostream*) } bool cmCPackArchiveGenerator::SupportsComponentInstallation() const { - return true; + // The Component installation support should only + // be activated if explicitly requested by the user + // (for backward compatibility reason) + if (IsSet("CPACK_ARCHIVE_COMPONENT_INSTALL")) + { + return true; + } + else + { + return false; + } } -- cgit v0.12 From 12a7125b323fe2d996fd536f2808a94f6e02e438 Mon Sep 17 00:00:00 2001 From: Eric NOULARD Date: Wed, 1 Dec 2010 21:00:38 +0100 Subject: CPack Fix KWStyle error --- Source/CPack/cmCPackArchiveGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 8bbf699..ded329d 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -232,7 +232,9 @@ int cmCPackArchiveGenerator::PackageFiles() // CASE 1 : COMPONENT ALL-IN-ONE package // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested // then the package file is unique and should be open here. - if (allComponentInOne || (allGroupInOne && (!this->ComponentGroups.empty()))) + if (allComponentInOne || + (allGroupInOne && (!this->ComponentGroups.empty())) + ) { return PackageComponentsAllInOne(allComponentInOne); } -- cgit v0.12