Merge topic 'revert-cpack-package-empty-dirs'
4fa17553
Revert topic 'cpack-package-empty-dirs'
This commit is contained in:
commit
64b7baac4a
|
@ -1,4 +0,0 @@
|
||||||
cpack-package-empty-dirs
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
* The :module:`CPack` module learned to package empty directories.
|
|
|
@ -95,7 +95,6 @@ int cmCPackDebGenerator::PackageOnePack(std::string initialTopLevel,
|
||||||
std::string findExpr(this->GetOption("GEN_WDIR"));
|
std::string findExpr(this->GetOption("GEN_WDIR"));
|
||||||
findExpr += "/*";
|
findExpr += "/*";
|
||||||
gl.RecurseOn();
|
gl.RecurseOn();
|
||||||
gl.SetRecurseListDirs(true);
|
|
||||||
if ( !gl.FindFiles(findExpr) )
|
if ( !gl.FindFiles(findExpr) )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
@ -223,7 +222,6 @@ int cmCPackDebGenerator::PackageComponentsAllInOne()
|
||||||
std::string findExpr(this->GetOption("GEN_WDIR"));
|
std::string findExpr(this->GetOption("GEN_WDIR"));
|
||||||
findExpr += "/*";
|
findExpr += "/*";
|
||||||
gl.RecurseOn();
|
gl.RecurseOn();
|
||||||
gl.SetRecurseListDirs(true);
|
|
||||||
if ( !gl.FindFiles(findExpr) )
|
if ( !gl.FindFiles(findExpr) )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
|
|
@ -367,7 +367,6 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
"- Install directory: " << top << std::endl);
|
"- Install directory: " << top << std::endl);
|
||||||
gl.RecurseOn();
|
gl.RecurseOn();
|
||||||
gl.SetRecurseListDirs(true);
|
|
||||||
if ( !gl.FindFiles(findExpr) )
|
if ( !gl.FindFiles(findExpr) )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
@ -870,7 +869,6 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||||
cmsys::Glob glB;
|
cmsys::Glob glB;
|
||||||
findExpr += "/*";
|
findExpr += "/*";
|
||||||
glB.RecurseOn();
|
glB.RecurseOn();
|
||||||
glB.SetRecurseListDirs(true);
|
|
||||||
glB.FindFiles(findExpr);
|
glB.FindFiles(findExpr);
|
||||||
filesBefore = glB.GetFiles();
|
filesBefore = glB.GetFiles();
|
||||||
std::sort(filesBefore.begin(),filesBefore.end());
|
std::sort(filesBefore.begin(),filesBefore.end());
|
||||||
|
@ -910,7 +908,6 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||||
{
|
{
|
||||||
cmsys::Glob glA;
|
cmsys::Glob glA;
|
||||||
glA.RecurseOn();
|
glA.RecurseOn();
|
||||||
glA.SetRecurseListDirs(true);
|
|
||||||
glA.FindFiles(findExpr);
|
glA.FindFiles(findExpr);
|
||||||
std::vector<std::string> filesAfter = glA.GetFiles();
|
std::vector<std::string> filesAfter = glA.GetFiles();
|
||||||
std::sort(filesAfter.begin(),filesAfter.end());
|
std::sort(filesAfter.begin(),filesAfter.end());
|
||||||
|
@ -1077,7 +1074,6 @@ int cmCPackGenerator::DoPackage()
|
||||||
std::string findExpr = tempDirectory;
|
std::string findExpr = tempDirectory;
|
||||||
findExpr += "/*";
|
findExpr += "/*";
|
||||||
gl.RecurseOn();
|
gl.RecurseOn();
|
||||||
gl.SetRecurseListDirs(true);
|
|
||||||
gl.SetRecurseThroughSymlinks(false);
|
gl.SetRecurseThroughSymlinks(false);
|
||||||
if ( !gl.FindFiles(findExpr) )
|
if ( !gl.FindFiles(findExpr) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -895,33 +895,12 @@ std::string cmSystemTools::FileExistsInParentDirectories(const char* fname,
|
||||||
|
|
||||||
bool cmSystemTools::cmCopyFile(const char* source, const char* destination)
|
bool cmSystemTools::cmCopyFile(const char* source, const char* destination)
|
||||||
{
|
{
|
||||||
// FIXME remove if statement once kwsys SystemTools get support for
|
|
||||||
// source is directory handling in CopyFileAlways function
|
|
||||||
if(cmSystemTools::FileIsDirectory(source))
|
|
||||||
{
|
|
||||||
return Superclass::MakeDirectory(destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Superclass::CopyFileAlways(source, destination);
|
return Superclass::CopyFileAlways(source, destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmSystemTools::CopyFileIfDifferent(const char* source,
|
bool cmSystemTools::CopyFileIfDifferent(const char* source,
|
||||||
const char* destination)
|
const char* destination)
|
||||||
{
|
{
|
||||||
// FIXME remove if statement once kwsys SystemTools get support for
|
|
||||||
// source is directory handling in CopyFileIfDifferent function
|
|
||||||
if(cmSystemTools::FileIsDirectory(source))
|
|
||||||
{
|
|
||||||
if(SystemTools::FileExists(destination))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return Superclass::MakeDirectory(destination);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Superclass::CopyFileIfDifferent(source, destination);
|
return Superclass::CopyFileIfDifferent(source, destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,8 +110,9 @@ install(FILES ${CPackComponentsDEB_BINARY_DIR}/symtest
|
||||||
if(EXISTS "./dirtest")
|
if(EXISTS "./dirtest")
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ./dirtest)
|
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ./dirtest)
|
||||||
endif()
|
endif()
|
||||||
# NOTE: directory left empty on purpose
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ./dirtest)
|
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ./dirtest)
|
||||||
|
# BUG: apparently cannot add an empty directory
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../mylibapp ./dirtest/symtest)
|
||||||
# NOTE: we should not add the trailing "/" to dirtest
|
# NOTE: we should not add the trailing "/" to dirtest
|
||||||
install(DIRECTORY ${CPackComponentsDEB_BINARY_DIR}/dirtest
|
install(DIRECTORY ${CPackComponentsDEB_BINARY_DIR}/dirtest
|
||||||
DESTINATION bin/
|
DESTINATION bin/
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
set(CPACK_COMPONENTS_ALL test)
|
|
||||||
install(DIRECTORY DESTINATION empty
|
|
||||||
COMPONENT test)
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_NAME "components_empty_dir")
|
|
|
@ -1,5 +0,0 @@
|
||||||
set(whitespaces_ "[\t\n\r ]*")
|
|
||||||
|
|
||||||
set(EXPECTED_FILES_COUNT "1")
|
|
||||||
set(EXPECTED_FILE_1 "components_empty_dir*.deb")
|
|
||||||
set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$")
|
|
|
@ -1,2 +0,0 @@
|
||||||
set(CPACK_PACKAGE_CONTACT "someone")
|
|
||||||
set(CPACK_DEB_COMPONENT_INSTALL "ON")
|
|
|
@ -1,5 +0,0 @@
|
||||||
set(whitespaces_ "[\t\n\r ]*")
|
|
||||||
|
|
||||||
set(EXPECTED_FILES_COUNT "1")
|
|
||||||
set(EXPECTED_FILE_1 "empty_dir*.deb")
|
|
||||||
set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$")
|
|
|
@ -1 +0,0 @@
|
||||||
set(CPACK_PACKAGE_CONTACT "someone")
|
|
|
@ -1,4 +0,0 @@
|
||||||
install(DIRECTORY DESTINATION empty
|
|
||||||
COMPONENT test)
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_NAME "empty_dir")
|
|
|
@ -1,5 +0,0 @@
|
||||||
set(whitespaces_ "[\t\n\r ]*")
|
|
||||||
|
|
||||||
set(EXPECTED_FILES_COUNT "1")
|
|
||||||
set(EXPECTED_FILE_1 "components_empty_dir*.rpm")
|
|
||||||
set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$")
|
|
|
@ -1 +0,0 @@
|
||||||
^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/COMPONENTS_EMPTY_DIR-build/_CPack_Packages/.*/RPM/SPECS/components_empty_dir.spec$
|
|
|
@ -1,5 +0,0 @@
|
||||||
set(whitespaces_ "[\t\n\r ]*")
|
|
||||||
|
|
||||||
set(EXPECTED_FILES_COUNT "1")
|
|
||||||
set(EXPECTED_FILE_1 "empty_dir*.rpm")
|
|
||||||
set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$")
|
|
|
@ -1 +0,0 @@
|
||||||
^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/EMPTY_DIR-build/_CPack_Packages/.*/RPM/SPECS/empty_dir.spec$
|
|
|
@ -8,5 +8,3 @@ run_cpack_test(MINIMAL "RPM;DEB" false)
|
||||||
run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false)
|
run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false)
|
||||||
run_cpack_test(DEB_EXTRA "DEB" false)
|
run_cpack_test(DEB_EXTRA "DEB" false)
|
||||||
run_cpack_test(DEPENDENCIES "RPM;DEB" true)
|
run_cpack_test(DEPENDENCIES "RPM;DEB" true)
|
||||||
run_cpack_test(EMPTY_DIR "RPM;DEB" true)
|
|
||||||
run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB" true)
|
|
||||||
|
|
Loading…
Reference in New Issue