From abc9b32375952ab0a6a67f513a7f8dc594b06049 Mon Sep 17 00:00:00 2001 From: Eric NOULARD Date: Tue, 17 Apr 2012 09:22:07 +0200 Subject: [PATCH] Use fakeroot for control.tar.gz as well --- Source/CPack/cmCPackDebGenerator.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 178a18d2f..fa456deff 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -480,11 +480,16 @@ int cmCPackDebGenerator::createDeb() // Do not end the md5sum file with yet another (invalid) } - cmd = "\""; - cmd += cmakeExecutable; - cmd += "\" -E tar cfz control.tar.gz ./control ./md5sums"; - const char* controlExtra = - this->GetOption("CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA"); + cmd = ""; + if (NULL != this->GetOption("CPACK_DEBIAN_FAKEROOT_EXECUTABLE")) + { + cmd = this->GetOption("CPACK_DEBIAN_FAKEROOT_EXECUTABLE"); + } + cmd += " \""; + cmd += cmakeExecutable; + cmd += "\" -E tar cfz control.tar.gz ./control ./md5sums"; + const char* controlExtra = + this->GetOption("CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA"); if( controlExtra ) { std::vector controlExtraList;