MantisBT - CMake
View Issue Details
0013009CMakeCTestpublic2012-03-02 07:062016-05-02 08:30
George Noseevich 
Raffi Enficiaud 
normalminoralways
closedfixed 
x86-64LinuxDebian 6 Squeeze
CMake 2.8.7 
CMake 3.4 
0013009: CPack DEB generator ignores top-level directories which do not contain a file
When generating a list of top-level dirs to pass arguments to tar, CPack gets the list of top-level dirs to install from the list of files to install.

This process overlooks empty top-level dirs and, generally, top-level dirs which do not contain files (though may contain empty subdirs).

See http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CPack/cmCPackDebGenerator.cxx;h=b707e96aa46779ca1e8ede78e02c1e2d47f94087;hb=HEAD#l405 [^]
lines 405 to 427.
Use the sample CMakeLists.txt:
PROJECT(WTF)
INCLUDE(CPack)

install(DIRECTORY DESTINATION /wtf)
install(DIRECTORY DESTINATION /foo)
install(DIRECTORY DESTINATION /bar)

Issue the following command:
mkdir build ; cd build ; cmake .. -DCPACK_GENERATOR="DEB" -DCPACK_DEBIAN_PACKAGE_MAINTAINER=" " ; make ; cpack --verbose --debug

This will generate a package file WTF-0.1.1-Linux.deb. Let's see what's in there:
dpkg -c WTF-0.1.1-Linux.deb
Oooops: Nothing's in it (should be 3 empty dirs).

The debug output from cpack is attached.
I'm not sure if this bug is related to http://public.kitware.com/Bug/view.php?id=8767 [^] , but they are definitely not the same.
No tags attached.
related to 0008767closed Domen Vrankar CPack tar generators ignore empty directories 
related to 0014978closed Domen Vrankar cpack excludes empty directories with archive generators (and others?) 
txt cpack-debug-log.txt (8,208) 2012-03-02 07:06
https://public.kitware.com/Bug/file/4244/cpack-debug-log.txt
Issue History
2012-03-02 07:06George NoseevichNew Issue
2012-03-02 07:06George NoseevichFile Added: cpack-debug-log.txt
2012-03-02 07:13Eric NOULARDRelationship addedrelated to 0008767
2012-08-11 21:09David ColeStatusnew => backlog
2012-08-11 21:09David ColeNote Added: 0030372
2015-09-14 10:27Clinton StimpsonRelationship addedrelated to 0014978
2015-09-20 10:18Raffi EnficiaudAssigned To => Raffi Enficiaud
2015-09-20 10:18Raffi EnficiaudStatusbacklog => assigned
2015-10-10 03:57Domen VrankarNote Added: 0039560
2015-10-10 03:57Domen VrankarStatusassigned => resolved
2015-10-10 03:57Domen VrankarFixed in Version => CMake 3.4
2015-10-10 03:57Domen VrankarResolutionopen => fixed
2016-05-02 08:30Robert MaynardNote Added: 0040968
2016-05-02 08:30Robert MaynardStatusresolved => closed

Notes
(0030372)
David Cole   
2012-08-11 21:09   
Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0039560)
Domen Vrankar   
2015-10-10 03:57   
Fixed with commits:
https://cmake.org/gitweb?p=cmake.git;a=commit;h=749a140 [^]
https://cmake.org/gitweb?p=cmake.git;a=commit;h=9298f56 [^]
(0040968)
Robert Maynard   
2016-05-02 08:30   
Closing resolved issues that have not been updated in more than 4 months.