Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#13145 closed defect (fixed)

selfupdate failure with MacPorts 1.5 due to volume name containing a space character

Reported by: seancontact@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.6
Component: base Version: 1.5.0
Keywords: Cc:
Port:

Description (last modified by jmpalacios (Juan Manuel Palacios))

I installed MacPorts 1.5.0 on PPC Mac running 10.4.10. Then I ran selfupdate and got the following output and error:

MacPorts base version 1.5 installed
Downloaded MacPorts base version 1.520
Configuring, Building and Installing new MacPorts base
Error: /opt/local/bin/port: selfupdate failed: Error installing new MacPorts base: shell command "cd /opt/local/var/macports/sources/rsync.macports.org/release/base && ./configure --prefix=/opt/local --with-install-user=root --with-ins
Command output:                 mv -v ${HOME}/.macports/macports.conf.tmp ${HOME}/.macports/macports.conf; \
        sed 's/dpupdate\/base\/\{0,1\}/trunk\/base\//g' ${HOME}/.macports/macports.conf > ${HOME}/.macports/macports.conf.tmp && \
                mv -v ${HOME}/.macports/macports.conf.tmp ${HOME}/.macports/macports.conf; \
        sed '/^rsync_options/s/"\(.*\)"/\1/' ${HOME}/.macports/macports.conf > ${HOME}/.macports/macports.conf.tmp && \
                mv -v ${HOME}/.macports/macports.conf.tmp ${HOME}/.macports/macports.conf; \
        sed 's/ --delete / /' ${HOME}/.macports/macports.conf > ${HOME}/.macports/macports.conf.tmp && \
                mv -v ${HOME}/.macports/macports.conf.tmp ${HOME}/.macports/macports.conf; \
        sed 's/ ports.conf(5)/ macports.conf(5)/g' ${HOME}/.macports/macports.conf > ${HOME}/.macports/macports.conf.tmp && \
                mv -v ${HOME}/.macports/macports.conf.tmp ${HOME}/.macports/macports.conf; \
}
/bin/sh: line 1: [: `)' expected, found Box/Users/stodd/.macports/ports.conf
usage: mv [-f | -i | -n] [-v] source target
       mv [-f | -i | -n] [-v] source ... directory
sed: /Volumes/Litter: No such file or directory
sed: Box/Users/stodd/.macports/macports.conf.mpsaved: No such file or directory
sed: /Volumes/Litter: No such file or directory
sed: Box/Users/stodd/.macports/macports.conf: No such file or directory
sed: /Volumes/Litter: No such file or directory
sed: Box/Users/stodd/.macports/macports.conf: No such file or directory
sed: /Volumes/Litter: No such file or directory
sed: Box/Users/stodd/.macports/macports.conf: No such file or directory
sed: /Volumes/Litter: No such file or directory
sed: Box/Users/stodd/.macports/macports.conf: No such file or directory
sed: /Volumes/Litter: No such file or directory
sed: Box/Users/stodd/.macports/macports.conf: No such file or directory
sed: /Volumes/Litter: No such file or directory
sed: Box/Users/stodd/.macports/macports.conf: No such file or directory
sed: /Volumes/Litter: No such file or directory
sed: Box/Users/stodd/.macports/macports.conf: No such file or directory
make: *** [upgrade] Error 1

Based on the line "sed: /Volumes/Litter: No such file or directory" it looks to me like the installer does not handle volume names containing spaces. The actual volume name is "Litter Box".

I never had this problem with earlier DarwinPorts.

Change History (8)

comment:1 Changed 17 years ago by afb@…

Looks like dp2mp-move script doesn't support spaces. Install MacPorts 1.5.2 from source instead.

http://svn.macports.org/repository/macports/distfiles/MacPorts/MacPorts-1.5.2.tar.bz2

comment:3 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)

Description: modified (diff)
Resolution: wontfix
Status: newclosed

Although I had the inclination to fix this limitation in my upgrade code, truth of the matter is that we don't really support installing onto paths with spaces at all that well in the first place. I tried configuring MacPorts sources to install onto "/opt/mac ports" to test a fix and I couldn't even get past that very first stage. Now I know the OP had MacPorts in the default /opt/local, but the path leading up to his home dir (where MacPorts also looks for files) did have spaces in it ("/Volumes/Litter Box/Users/(...)", if I'm not mistaken).

MacPorts put aside, Unix software in general behaves very poorly with paths that contain with spaces, needing escaping and/or quoting all around to bypass them. So, in general, I'd really recommend against this setup.

Thanks for the report, though, will turn it into a FAQ entry for later reference! Closing ticket.

-jmpp

comment:4 Changed 17 years ago by seancontact@…

Just adding my 2 cents: The Mac OS has always supported volume names that include spaces. The fact that Unixes in general do not support this or that it requires extra work (escaping paths) to handle this situation are not a good excuses, in my opinion, for not supporting such a case now. This is "MacPorts" afterall.

comment:5 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)

Milestone: MacPorts base bugs
Resolution: wontfix
Status: closedreopened

comment:6 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)

Resolution: fixed
Status: reopenedclosed

I think I fixed this in r31522, which will be in our next release. Please give it a try at that moment if you can (that is, if you still have that old installation and that path with spaces in it) and report back here how it goes. Closing ticket.

-jmpp

PS: Note that the escaping of the spaces is performed only when accessing the shell $HOME variable to upgrade the user specific MacPorts conf file, but none is performed on any of the other variables in this upgrade code as MacPorts itself doesn't really support installing onto paths with spaces, as already explained in this ticket.

comment:7 Changed 16 years ago by tobypeterson

Milestone: MacPorts base bugsMacPorts Future

Milestone MacPorts base bugs deleted

comment:8 Changed 15 years ago by jmroot (Joshua Root)

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