[MacPorts] #60365: MacPorts doesn't work when software directory is symlinked to a path that has spaces (was: MacPorts doesn't work when cache directory has spaces)

MacPorts noreply at macports.org
Fri Apr 17 20:22:02 UTC 2020


#60365: MacPorts doesn't work when software directory is symlinked to a path that
has spaces
------------------------+--------------------
  Reporter:  At0micMac  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Low        |  Milestone:
 Component:  base       |    Version:  2.6.2
Resolution:             |   Keywords:
      Port:             |
------------------------+--------------------
Changes (by ryandesign):

 * priority:  Normal => Low


Old description:

> 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.

New description:

 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.
 }}}

--

Comment:

 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.

-- 
Ticket URL: <https://trac.macports.org/ticket/60365#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list