Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #12429 (reopened defect)

Opened 13 months ago

Last modified 3 months ago

port cannot handle spaces in various variables

Reported by: nox@… Owned by: macports-tickets@…
Priority: High Milestone: MacPorts base bugs
Component: base Version: 1.7.0
Keywords: Cc: sfiera@…, ryandesign@…
Port:

Description

Here is my code (taken from libsdl_gfx-framework):

worksrcdir      "${distname}/Other Builds"

post-extract {
    system "cd ${worksrcpath} && tar -xvzf OSX-PB.tgz"
}

port output:

--->  Extracting SDL_gfx-2.0.16.tar.gz
DEBUG: setting option extract.args to /opt/local/var/macports/distfiles/libsdl_gfx/SDL_gfx-2.0.16.tar.gz
DEBUG: Environment: 
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_Users_N_Ox_src_MacPorts_ports_devel_libsdl_gfx-framework/work" && gzip -dc /opt/local/var/macports/distfiles/libsdl_gfx/SDL_gfx-2.0.16.tar.gz | /usr/bin/gnutar --no-same-owner -xf -'
DEBUG: Executing proc-post-org.macports.extract-extract-0
sh: line 1: cd: /opt/local/var/macports/build/_Users_N_Ox_src_MacPorts_ports_devel_libsdl_gfx-framework/work/{SDL_gfx-2.0.16/Other: No such file or directory
Error: Target org.macports.extract returned: shell command "cd /opt/local/var/macports/build/_Users_N_Ox_src_MacPorts_ports_devel_libsdl_gfx-framework/work/{SDL_gfx-2.0.16/Other Builds} && tar -xvzf OSX-PB.tgz" returned error 1
Command output: sh: line 1: cd: /opt/local/var/macports/build/_Users_N_Ox_src_MacPorts_ports_devel_libsdl_gfx-framework/work/{SDL_gfx-2.0.16/Other: No such file or directory

Warning: the following items did not execute (for libsdl_gfx-framework): org.macports.extract
Error: Status 1 encountered during processing.

Change History

Changed 13 months ago by sfiera@…

  • cc sfiera@… added

Can you confirm that this is a problem with port and not just your post-extract? From what I can tell, port is enquoting the dir correctly (portutil.c:222), whereas your system command is not (it should read system "cd \"${worksrcpath}\" && tar -xvzf OSX-PB.tgz")

Changed 13 months ago by nox@…

Look at the error: the shell command is printed, double quotes or not, the path is /opt/local/var/macports/build/_Users_N_Ox_src_MacPorts_ports_devel_libsdl_gfx-framework/work/{SDL_gfx-2.0.16/Other Builds}. These curly brackets should not be here.

Changed 13 months ago by sfiera@…

Ah, yes, I didn't read closely enough. I know this is going to sound weird, but what happens if you remove the double quotes from the worksrcdir option? If I recall, options are lists; SDL_gfx-2.0.16/Other Builds is a two-element list but {SDL_gfx-2.0.16/Other Builds} is a one-element list as you specified.

Changed 13 months ago by nox@…

Without quotes, only the first list item is taken into account, and the path becomes work/SDL_gfx-2.0.16/Other

Changed 13 months ago by nox@…

  • cc changed from nox@macports.org,sfiera@macports.org to nox@macports.org, sfiera@macports.org
  • summary changed from port cannot handle spaces in worksrcdir to port cannot handle spaces in various variables

xcode.build.settings is also affected: The following code:

variant universal {
    xcode.build.settings-append "ARCHS=\"ppc i386\""
    xcode.destroot.settings     ${xcode.build.settings}
}

produces the following build.cmd:

xcodebuild  -target "SDL_gfx" -configuration Deployment build OBJROOT=build/ SYMROOT=build/ {ARCHS="ppc i386"}

I think this bug should be handled with High priority.

Changed 13 months ago by nox@…

  • priority changed from Normal to High

xcode.project produces garbage too.

Changed 7 months ago by nox@…

  • cc nox@… removed
  • status changed from new to closed
  • resolution set to invalid
  • milestone MacPorts base bugs deleted

Let's close this one. It's way too old and I don't even remember what I was talking about.

Changed 3 months ago by ryandesign@…

  • cc ryandesign@… added
  • status changed from closed to reopened
  • version set to 1.7.0
  • resolution invalid deleted
  • milestone set to MacPorts base bugs

It's still an issue with trunk @37836. I can still reproduce the problem in comment 5.

Note: See TracTickets for help on using tickets.