[MacPorts] #35910: Cannot build Macports in path containing spaces

MacPorts noreply at macports.org
Sun Sep 2 02:59:37 PDT 2012


#35910: Cannot build Macports in path containing spaces
-------------------------------------+--------------------------------------
 Reporter:  cowwoc@…                 |       Owner:  macports-tickets@…                   
     Type:  defect                   |      Status:  new                                  
 Priority:  Normal                   |   Milestone:                                       
Component:  base                     |     Version:  2.1.1                                
 Keywords:                           |        Port:                                       
-------------------------------------+--------------------------------------

Comment(by ryandesign@…):

 There are probably hundreds or thousands of Portfiles in which we use the
 variable ${prefix} (or ${worksrcpath} or ${destroot} or ${filespath} or
 ${distpath}, whose values begins with ${prefix}) in a shell command in a
 portfile without quoting it because we assume the prefix doesn't contain a
 space. Just looking at this very common construct which would fail if
 worksrcpath contained a space:
 {{{
 system "cd ${worksrcpath} && ..."
 }}}
 Using grep over our ports collection, I count over 300 ports doing that.
 This particular space-in-path problem has a simple solution: this code
 should be changed to:
 {{{
 system -W ${worksrcpath} "..."
 }}}
 but while changing "cd" to "-W" could be done with a simple search and
 replace, other situations would have to be examined on a case-by-case
 basis. You'd probably have to look at every "system" invocation; I count
 over 2600 "system" calls in our portfiles today.

-- 
Ticket URL: <https://trac.macports.org/ticket/35910#comment:9>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list