[cmake-developers] [CMake 0014660]: File tree builder is too greedy with 'sed'

Mantis Bug Tracker mantis at public.kitware.com
Thu Dec 19 12:44:32 EST 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14660 
====================================================================== 
Reported By:                Joe Nardone
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14660
Category:                   CPack
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-12-19 12:44 EST
Last Modified:              2013-12-19 12:44 EST
====================================================================== 
Summary:                    File tree builder is too greedy with 'sed'
Description: 
CPackRPM uses the following crazy `find` command to build its file list:

execute_process(COMMAND find . -type f -o -type l -o (-type d -a -not ( -name
"." ${_RPM_DIRS_TO_OMIT} ) )
                COMMAND sed s:.*/man.*/.*:&*:
                COMMAND sed s/\\.\\\(.*\\\)/\"\\1\"/
                WORKING_DIRECTORY "${WDIR}"
                OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)

However, the first `sed` is too greedy.  It will match any path with the text
'man' in it.  Which is fine for man pages, but for, say, a company name with
those letters in it (even if it's in the install prefix) it will match every
single item, and wildcard them.  This leads to lots of files getting included
multiple times.

Steps to Reproduce: 
Any package that has something like:

set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/manna")

should trigger it.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-12-19 12:44 Joe Nardone    New Issue                                    
======================================================================




More information about the cmake-developers mailing list