[Cmake-commits] [cmake-commits] alex committed cmCPackDebGenerator.cxx 1.20 1.21
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Mar 28 20:23:04 EDT 2008
Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv31857
Modified Files:
cmCPackDebGenerator.cxx
Log Message:
BUG: fix packaging of files installed to absolute paths, works only when
used with SET(CPACK_SET_DESTDIR "ON")
Alex
Index: cmCPackDebGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackDebGenerator.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -C 2 -d -r1.20 -r1.21
*** cmCPackDebGenerator.cxx 24 Jan 2008 12:31:59 -0000 1.20
--- cmCPackDebGenerator.cxx 29 Mar 2008 00:23:01 -0000 1.21
***************
*** 125,129 ****
cmd = "\"";
cmd += cmakeExecutable;
! cmd += "\" -E tar cfz data.tar.gz ./usr";
std::string output;
int retVal = -1;
--- 125,149 ----
cmd = "\"";
cmd += cmakeExecutable;
! cmd += "\" -E tar cfz data.tar.gz ";
!
! // now add all directories which have to be compressed
! // collect all top level install dirs for that
! // e.g. /opt/bin/foo, /usr/bin/bar and /usr/bin/baz would give /usr and /opt
! int topLevelLength = strlen(toplevel);
! std::set<std::string> installDirs;
! for (std::vector<std::string>::const_iterator fileIt = files.begin();
! fileIt != files.end(); ++ fileIt )
! {
! std::string::size_type slashPos = fileIt->find('/', topLevelLength+1);
! std::string relativeDir = fileIt->substr(topLevelLength,
! slashPos - topLevelLength);
! if (installDirs.find(relativeDir) == installDirs.end())
! {
! installDirs.insert(relativeDir);
! cmd += " .";
! cmd += relativeDir;
! }
! }
!
std::string output;
int retVal = -1;
More information about the Cmake-commits
mailing list