Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60365 closed defect (fixed)

MacPorts doesn't work when software directory is symlinked to a path that has spaces

Reported by: At0micMac Owned by: jmroot (Joshua Root)
Priority: Low Milestone: MacPorts 2.6.3
Component: base Version: 2.6.2
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hello, I have had to set up MacPorts on my machine running Sierra, due to brew no longer supporting it. Due to the limited space on my internal SSD, I have moved the "/opt/local/macports/software" directory to my external HDD, and "ln -s"'d it to the location (since there doesn't seem to be an option to specify the location, like homebrew). Unfortunately, this drive has a space in its name. This results in failed builds, since the path isn't quoted:

:debug:activate system: /usr/bin/bzip2 -d -c /Volumes/Macintosh HD/Cache/macports/software/curl-ca-bundle/curl-ca-bundle-7.69.1_0.darwin_16.noarch.tbz2 | ( bsdtar -xvp --hfsCompression -f - )
:info:activate bzip2: Can't open input file /Volumes/Macintosh: No such file or directory.

Change History (3)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Priority: NormalLow
Summary: MacPorts doesn't work when cache directory has spacesMacPorts doesn't work when software directory is symlinked to a path that has spaces

Correct, there is no option to specify where the software will be installed. It will be installed in ${prefix}/var/macports/software.

MacPorts is designed with the assumption that ${prefix} and its private directories therein are real directories, not symlinks. Using symlinks may work in some cases, but in others you may run into issues.

Unix build systems often don't work with paths containing spaces so even though it may be possible to fix this issue, there are likely similar issues with other aspects of MacPorts base itself and with the build systems of most of the ports offered by MacPorts.

If you can submit a pull request that fixes this specific issue it would probably be accepted.

Until then you'll have to rename the drive so that its name doesn't contain spaces.

comment:2 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In 8a088c30d80c7c3eca10848f28835e1c180229b1/macports-base (master):

Quote port archive paths correctly when extracting

Fixes: #60365

comment:3 Changed 4 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.6.3
Note: See TracTickets for help on using tickets.