cmake/Source/CPack/cmCPackRPMGenerator.cxx

473 lines
17 KiB
C++
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackRPMGenerator.h"
2016-07-09 11:21:54 +02:00
2016-10-30 18:24:19 +01:00
#include <algorithm>
2020-02-01 23:06:01 +01:00
#include <cctype>
2016-10-30 18:24:19 +01:00
#include <map>
#include <ostream>
#include <utility>
#include <vector>
2017-04-14 19:02:05 +02:00
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
2024-07-09 14:46:46 +02:00
#include "cmCryptoHash.h"
2020-02-01 23:06:01 +01:00
#include "cmStringAlgorithms.h"
2017-04-14 19:02:05 +02:00
#include "cmSystemTools.h"
2021-11-20 13:41:27 +01:00
#include "cmValue.h"
2017-04-14 19:02:05 +02:00
2019-11-11 23:01:05 +01:00
cmCPackRPMGenerator::cmCPackRPMGenerator() = default;
2019-11-11 23:01:05 +01:00
cmCPackRPMGenerator::~cmCPackRPMGenerator() = default;
int cmCPackRPMGenerator::InitializeInternal()
{
this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
2020-02-01 23:06:01 +01:00
if (cmIsOff(this->GetOption("CPACK_SET_DESTDIR"))) {
2010-11-13 01:00:53 +02:00
this->SetOption("CPACK_SET_DESTDIR", "I_ON");
2016-07-09 11:21:54 +02:00
}
2011-06-19 15:41:06 +03:00
/* Replace space in CPACK_PACKAGE_NAME in order to avoid
* rpmbuild scream on unwanted space in filename issue
* Moreover RPM file do not usually embed space in filename
*/
if (this->GetOption("CPACK_PACKAGE_NAME")) {
2016-07-09 11:21:54 +02:00
std::string packageName = this->GetOption("CPACK_PACKAGE_NAME");
std::replace(packageName.begin(), packageName.end(), ' ', '-');
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_PACKAGE_NAME", packageName);
2011-06-19 15:41:06 +03:00
}
/* same for CPACK_PACKAGE_FILE_NAME */
if (this->GetOption("CPACK_PACKAGE_FILE_NAME")) {
2016-07-09 11:21:54 +02:00
std::string packageName = this->GetOption("CPACK_PACKAGE_FILE_NAME");
std::replace(packageName.begin(), packageName.end(), ' ', '-');
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_PACKAGE_FILE_NAME", packageName);
2011-06-19 15:41:06 +03:00
}
return this->Superclass::InitializeInternal();
}
2016-07-09 11:21:54 +02:00
void cmCPackRPMGenerator::AddGeneratedPackageNames()
{
// add the generated packages to package file names list
std::string fileNames(this->GetOption("GEN_CPACK_OUTPUT_FILES"));
const char sep = ';';
std::string::size_type pos1 = 0;
std::string::size_type pos2 = fileNames.find(sep, pos1 + 1);
while (pos2 != std::string::npos) {
2021-09-14 00:13:48 +02:00
this->packageFileNames.push_back(fileNames.substr(pos1, pos2 - pos1));
2016-07-09 11:21:54 +02:00
pos1 = pos2 + 1;
pos2 = fileNames.find(sep, pos1 + 1);
}
2021-09-14 00:13:48 +02:00
this->packageFileNames.push_back(fileNames.substr(pos1, pos2 - pos1));
2016-07-09 11:21:54 +02:00
}
int cmCPackRPMGenerator::PackageOnePack(std::string const& initialToplevel,
std::string const& packageName)
{
2024-07-09 14:46:46 +02:00
// Determine the sanitized package name that can be used in file-names on
// the file-system.
std::string sanitizedPkgNameSuffix =
this->GetSanitizedDirOrFileName(packageName, false);
// Determine the sanitized packaging directory-name that can be used on the
// file-system.
std::string sanitizedPkgDirName =
this->GetSanitizedDirOrFileName(packageName);
2011-06-19 15:41:06 +03:00
// Begin the archive for this pack
std::string localToplevel(initialToplevel);
2021-09-14 00:13:48 +02:00
std::string packageFileName(
cmSystemTools::GetParentDirectory(this->toplevel));
2011-06-19 15:41:06 +03:00
std::string outputFileName(
2021-09-14 00:13:48 +02:00
this->GetComponentPackageFileName(
this->GetOption("CPACK_PACKAGE_FILE_NAME"), packageName, true) +
2016-07-09 11:21:54 +02:00
this->GetOutputExtension());
2011-01-16 11:35:12 +01:00
2024-07-09 14:46:46 +02:00
localToplevel += "/" + sanitizedPkgDirName;
2011-06-19 15:41:06 +03:00
/* replace the TEMP DIRECTORY with the component one */
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel);
2016-07-09 11:21:54 +02:00
packageFileName += "/" + outputFileName;
2011-06-19 15:41:06 +03:00
/* replace proposed CPACK_OUTPUT_FILE_NAME */
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_OUTPUT_FILE_NAME", outputFileName);
2011-06-19 15:41:06 +03:00
/* replace the TEMPORARY package file name */
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME", packageFileName);
2011-06-19 15:41:06 +03:00
// Tell CPackRPM.cmake the name of the component NAME.
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_RPM_PACKAGE_COMPONENT", packageName);
2024-07-09 14:46:46 +02:00
// Tell CPackRPM.cmake the suffix for the component NAME.
this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_NAME",
sanitizedPkgNameSuffix);
2013-03-16 19:13:01 +02:00
// Tell CPackRPM.cmake the path where the component is.
2024-07-09 14:46:46 +02:00
std::string component_path = cmStrCat('/', sanitizedPkgDirName);
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_PATH", component_path);
2018-10-28 12:09:07 +01:00
if (!this->ReadListFile("Internal/CPack/CPackRPM.cmake")) {
2018-08-09 18:06:22 +02:00
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error while execution CPackRPM.cmake" << std::endl);
2024-07-09 14:46:46 +02:00
return 0;
2016-07-09 11:21:54 +02:00
}
2024-07-09 14:46:46 +02:00
return 1;
}
std::string cmCPackRPMGenerator::GetSanitizedDirOrFileName(
const std::string& name, bool isFullName) const
{
auto sanitizedName =
this->cmCPackGenerator::GetSanitizedDirOrFileName(name, isFullName);
if (sanitizedName == name && !isFullName) {
// Make sure to also sanitize if name contains a colon (':').
if (name.find_first_of(':') != std::string::npos) {
cmCryptoHash hasher(cmCryptoHash::AlgoMD5);
return hasher.HashString(name);
}
}
return sanitizedName;
2011-06-19 15:41:06 +03:00
}
int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
{
int retval = 1;
/* Reset package file name list it will be populated during the
* component packaging run*/
2021-09-14 00:13:48 +02:00
this->packageFileNames.clear();
2011-06-19 15:41:06 +03:00
std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
2021-11-20 13:41:27 +01:00
cmValue mainComponent = this->GetOption("CPACK_RPM_MAIN_COMPONENT");
2017-04-14 19:02:05 +02:00
if (this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE") &&
!this->IsOn("CPACK_RPM_DEBUGINFO_PACKAGE")) {
// check if we need to set CPACK_RPM_DEBUGINFO_PACKAGE because non of
// the components is setting per component debuginfo package variable
bool shouldSet = true;
if (ignoreGroup) {
std::map<std::string, cmCPackComponent>::iterator compIt;
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
std::string component(compIt->first);
std::transform(component.begin(), component.end(), component.begin(),
::toupper);
if (this->IsOn("CPACK_RPM_" + compIt->first + "_DEBUGINFO_PACKAGE") ||
this->IsOn("CPACK_RPM_" + component + "_DEBUGINFO_PACKAGE")) {
shouldSet = false;
break;
}
}
} else {
std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
for (compGIt = this->ComponentGroups.begin();
compGIt != this->ComponentGroups.end(); ++compGIt) {
std::string component(compGIt->first);
std::transform(component.begin(), component.end(), component.begin(),
::toupper);
if (this->IsOn("CPACK_RPM_" + compGIt->first + "_DEBUGINFO_PACKAGE") ||
this->IsOn("CPACK_RPM_" + component + "_DEBUGINFO_PACKAGE")) {
shouldSet = false;
break;
}
}
if (shouldSet) {
std::map<std::string, cmCPackComponent>::iterator compIt;
for (compIt = this->Components.begin();
compIt != this->Components.end(); ++compIt) {
// Does the component belong to a group?
2018-01-26 17:06:56 +01:00
if (compIt->second.Group == nullptr) {
2017-04-14 19:02:05 +02:00
std::string component(compIt->first);
std::transform(component.begin(), component.end(),
component.begin(), ::toupper);
if (this->IsOn("CPACK_RPM_" + compIt->first +
"_DEBUGINFO_PACKAGE") ||
this->IsOn("CPACK_RPM_" + component + "_DEBUGINFO_PACKAGE")) {
shouldSet = false;
break;
}
}
}
}
}
if (shouldSet) {
2018-08-09 18:06:22 +02:00
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Setting "
2017-04-14 19:02:05 +02:00
<< "CPACK_RPM_DEBUGINFO_PACKAGE because "
<< "CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is set but "
<< " none of the "
<< "CPACK_RPM_<component>_DEBUGINFO_PACKAGE variables "
<< "are set." << std::endl);
this->SetOption("CPACK_RPM_DEBUGINFO_PACKAGE", "ON");
}
}
if (mainComponent) {
if (this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE")) {
this->SetOption("GENERATE_SPEC_PARTS", "ON");
}
std::string mainComponentUpper(mainComponent);
std::transform(mainComponentUpper.begin(), mainComponentUpper.end(),
mainComponentUpper.begin(), ::toupper);
// The default behavior is to have one package by component group
// unless CPACK_COMPONENTS_IGNORE_GROUP is specified.
if (!ignoreGroup) {
2020-02-01 23:06:01 +01:00
auto mainCompGIt = this->ComponentGroups.end();
2017-04-14 19:02:05 +02:00
std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
for (compGIt = this->ComponentGroups.begin();
compGIt != this->ComponentGroups.end(); ++compGIt) {
std::string component(compGIt->first);
std::transform(component.begin(), component.end(), component.begin(),
::toupper);
if (mainComponentUpper == component) {
// main component will be handled last
mainCompGIt = compGIt;
continue;
}
2018-08-09 18:06:22 +02:00
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Packaging component group: " << compGIt->first
<< std::endl);
2021-09-14 00:13:48 +02:00
retval &= this->PackageOnePack(initialTopLevel, compGIt->first);
2017-04-14 19:02:05 +02:00
}
// Handle Orphan components (components not belonging to any groups)
2020-02-01 23:06:01 +01:00
auto mainCompIt = this->Components.end();
2017-04-14 19:02:05 +02:00
std::map<std::string, cmCPackComponent>::iterator compIt;
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
// Does the component belong to a group?
2018-01-26 17:06:56 +01:00
if (compIt->second.Group == nullptr) {
2017-04-14 19:02:05 +02:00
std::string component(compIt->first);
std::transform(component.begin(), component.end(), component.begin(),
::toupper);
if (mainComponentUpper == component) {
// main component will be handled last
mainCompIt = compIt;
continue;
}
cmCPackLogger(
2018-08-09 18:06:22 +02:00
cmCPackLog::LOG_VERBOSE,
"Component <"
2017-04-14 19:02:05 +02:00
<< compIt->second.Name
<< "> does not belong to any group, package it separately."
<< std::endl);
2021-09-14 00:13:48 +02:00
retval &= this->PackageOnePack(initialTopLevel, compIt->first);
2017-04-14 19:02:05 +02:00
}
}
if (retval) {
this->SetOption("GENERATE_SPEC_PARTS", "OFF");
if (mainCompGIt != this->ComponentGroups.end()) {
2021-09-14 00:13:48 +02:00
retval &= this->PackageOnePack(initialTopLevel, mainCompGIt->first);
2017-04-14 19:02:05 +02:00
} else if (mainCompIt != this->Components.end()) {
2021-09-14 00:13:48 +02:00
retval &= this->PackageOnePack(initialTopLevel, mainCompIt->first);
2017-04-14 19:02:05 +02:00
} else {
2018-08-09 18:06:22 +02:00
cmCPackLogger(cmCPackLog::LOG_ERROR,
"CPACK_RPM_MAIN_COMPONENT set"
2017-04-14 19:02:05 +02:00
<< " to non existing component.\n");
retval = 0;
}
}
2016-07-09 11:21:54 +02:00
}
2017-04-14 19:02:05 +02:00
// CPACK_COMPONENTS_IGNORE_GROUPS is set
// We build 1 package per component
else {
2020-02-01 23:06:01 +01:00
auto mainCompIt = this->Components.end();
2017-04-14 19:02:05 +02:00
std::map<std::string, cmCPackComponent>::iterator compIt;
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
std::string component(compIt->first);
std::transform(component.begin(), component.end(), component.begin(),
::toupper);
if (mainComponentUpper == component) {
// main component will be handled last
mainCompIt = compIt;
continue;
}
2021-09-14 00:13:48 +02:00
retval &= this->PackageOnePack(initialTopLevel, compIt->first);
2011-01-16 11:35:12 +01:00
}
2017-04-14 19:02:05 +02:00
if (retval) {
this->SetOption("GENERATE_SPEC_PARTS", "OFF");
if (mainCompIt != this->Components.end()) {
2021-09-14 00:13:48 +02:00
retval &= this->PackageOnePack(initialTopLevel, mainCompIt->first);
2017-04-14 19:02:05 +02:00
} else {
2018-08-09 18:06:22 +02:00
cmCPackLogger(cmCPackLog::LOG_ERROR,
"CPACK_RPM_MAIN_COMPONENT set"
2017-04-14 19:02:05 +02:00
<< " to non existing component.\n");
retval = 0;
}
}
2011-01-16 11:35:12 +01:00
}
2017-04-14 19:02:05 +02:00
} else if (!this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE") ||
this->Components.size() == 1) {
// The default behavior is to have one package by component group
// unless CPACK_COMPONENTS_IGNORE_GROUP is specified.
if (!ignoreGroup) {
std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
for (compGIt = this->ComponentGroups.begin();
compGIt != this->ComponentGroups.end(); ++compGIt) {
2018-08-09 18:06:22 +02:00
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Packaging component group: " << compGIt->first
<< std::endl);
2021-09-14 00:13:48 +02:00
retval &= this->PackageOnePack(initialTopLevel, compGIt->first);
2017-04-14 19:02:05 +02:00
}
// Handle Orphan components (components not belonging to any groups)
std::map<std::string, cmCPackComponent>::iterator compIt;
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
// Does the component belong to a group?
2018-01-26 17:06:56 +01:00
if (compIt->second.Group == nullptr) {
2017-04-14 19:02:05 +02:00
cmCPackLogger(
2018-08-09 18:06:22 +02:00
cmCPackLog::LOG_VERBOSE,
"Component <"
2017-04-14 19:02:05 +02:00
<< compIt->second.Name
<< "> does not belong to any group, package it separately."
<< std::endl);
2021-09-14 00:13:48 +02:00
retval &= this->PackageOnePack(initialTopLevel, compIt->first);
2017-04-14 19:02:05 +02:00
}
}
2011-06-19 15:41:06 +03:00
}
2017-04-14 19:02:05 +02:00
// CPACK_COMPONENTS_IGNORE_GROUPS is set
// We build 1 package per component
else {
std::map<std::string, cmCPackComponent>::iterator compIt;
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
2021-09-14 00:13:48 +02:00
retval &= this->PackageOnePack(initialTopLevel, compIt->first);
2017-04-14 19:02:05 +02:00
}
}
} else {
cmCPackLogger(
2018-08-09 18:06:22 +02:00
cmCPackLog::LOG_ERROR,
"CPACK_RPM_MAIN_COMPONENT not set but"
2017-04-14 19:02:05 +02:00
<< " it is mandatory with CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE"
<< " being set.\n");
retval = 0;
2016-07-09 11:21:54 +02:00
}
if (retval) {
2021-09-14 00:13:48 +02:00
this->AddGeneratedPackageNames();
2022-03-29 21:10:50 +02:00
return retval;
2016-07-09 11:21:54 +02:00
}
2022-03-29 21:10:50 +02:00
return 0;
2011-06-19 15:41:06 +03:00
}
2016-07-09 11:21:54 +02:00
int cmCPackRPMGenerator::PackageComponentsAllInOne(
const std::string& compInstDirName)
2011-06-19 15:41:06 +03:00
{
int retval = 1;
/* Reset package file name list it will be populated during the
* component packaging run*/
2021-09-14 00:13:48 +02:00
this->packageFileNames.clear();
2011-06-19 15:41:06 +03:00
std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
2017-04-14 19:02:05 +02:00
if (this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE")) {
this->SetOption("CPACK_RPM_DEBUGINFO_PACKAGE", "ON");
}
2011-06-19 15:41:06 +03:00
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Packaging all groups in one package..."
"(CPACK_COMPONENTS_ALL_[GROUPS_]IN_ONE_PACKAGE is set)"
2016-07-09 11:21:54 +02:00
<< std::endl);
2011-06-19 15:41:06 +03:00
// The ALL GROUPS in ONE package case
std::string localToplevel(initialTopLevel);
2021-09-14 00:13:48 +02:00
std::string packageFileName(
cmSystemTools::GetParentDirectory(this->toplevel));
2011-06-19 15:41:06 +03:00
std::string outputFileName(
2016-07-09 11:21:54 +02:00
std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) +
this->GetOutputExtension());
2011-06-19 15:41:06 +03:00
// all GROUP in one vs all COMPONENT in one
2016-07-09 11:21:54 +02:00
localToplevel += "/" + compInstDirName;
2011-06-19 15:41:06 +03:00
/* replace the TEMP DIRECTORY with the component one */
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel);
2016-07-09 11:21:54 +02:00
packageFileName += "/" + outputFileName;
2011-06-19 15:41:06 +03:00
/* replace proposed CPACK_OUTPUT_FILE_NAME */
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_OUTPUT_FILE_NAME", outputFileName);
2011-06-19 15:41:06 +03:00
/* replace the TEMPORARY package file name */
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME", packageFileName);
2016-07-09 11:21:54 +02:00
if (!compInstDirName.empty()) {
// Tell CPackRPM.cmake the path where the component is.
2020-02-01 23:06:01 +01:00
std::string component_path = cmStrCat('/', compInstDirName);
2021-11-20 13:41:27 +01:00
this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_PATH", component_path);
2016-07-09 11:21:54 +02:00
}
2018-10-28 12:09:07 +01:00
if (this->ReadListFile("Internal/CPack/CPackRPM.cmake")) {
2021-09-14 00:13:48 +02:00
this->AddGeneratedPackageNames();
2016-07-09 11:21:54 +02:00
} else {
2018-08-09 18:06:22 +02:00
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error while execution CPackRPM.cmake" << std::endl);
2011-06-19 15:41:06 +03:00
retval = 0;
2016-07-09 11:21:54 +02:00
}
2011-06-19 15:41:06 +03:00
return retval;
}
int cmCPackRPMGenerator::PackageFiles()
{
2021-09-14 00:13:48 +02:00
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Toplevel: " << this->toplevel << std::endl);
2011-06-19 15:41:06 +03:00
/* Are we in the component packaging case */
2021-09-14 00:13:48 +02:00
if (this->WantsComponentInstallation()) {
2011-06-19 15:41:06 +03:00
// CASE 1 : COMPONENT ALL-IN-ONE package
// If ALL COMPONENTS in ONE package has been requested
// then the package file is unique and should be open here.
2021-09-14 00:13:48 +02:00
if (this->componentPackageMethod == ONE_PACKAGE) {
return this->PackageComponentsAllInOne("ALL_COMPONENTS_IN_ONE");
2016-07-09 11:21:54 +02:00
}
2011-06-19 15:41:06 +03:00
// 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.
2021-09-14 00:13:48 +02:00
return this->PackageComponents(this->componentPackageMethod ==
ONE_PACKAGE_PER_COMPONENT);
2011-06-19 15:41:06 +03:00
}
// CASE 3 : NON COMPONENT package.
2021-09-14 00:13:48 +02:00
return this->PackageComponentsAllInOne("");
}
2011-01-16 11:35:12 +01:00
bool cmCPackRPMGenerator::SupportsComponentInstallation() const
2016-07-09 11:21:54 +02:00
{
2021-09-14 00:13:48 +02:00
return this->IsOn("CPACK_RPM_COMPONENT_INSTALL");
2016-07-09 11:21:54 +02:00
}
2024-07-09 14:46:46 +02:00
std::string cmCPackRPMGenerator::GetComponentInstallSuffix(
2016-07-09 11:21:54 +02:00
const std::string& componentName)
{
2021-09-14 00:13:48 +02:00
if (this->componentPackageMethod == ONE_PACKAGE_PER_COMPONENT) {
2011-06-19 15:41:06 +03:00
return componentName;
}
2021-09-14 00:13:48 +02:00
if (this->componentPackageMethod == ONE_PACKAGE) {
2022-03-29 21:10:50 +02:00
return { "ALL_COMPONENTS_IN_ONE" };
2011-06-19 15:41:06 +03:00
}
// We have to find the name of the COMPONENT GROUP
// the current COMPONENT belongs to.
2016-07-09 11:21:54 +02:00
std::string groupVar =
"CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP";
2021-09-14 00:13:48 +02:00
if (nullptr != this->GetOption(groupVar)) {
2024-07-09 14:46:46 +02:00
return *this->GetOption(groupVar);
2011-06-19 15:41:06 +03:00
}
2016-10-30 18:24:19 +01:00
return componentName;
2016-07-09 11:21:54 +02:00
}
2024-07-09 14:46:46 +02:00
std::string cmCPackRPMGenerator::GetComponentInstallDirNameSuffix(
const std::string& componentName)
{
return this->GetSanitizedDirOrFileName(
this->GetComponentInstallSuffix(componentName));
}