#43717: ./port -d sync fails when using "file:" protocol -------------------------+-------------------------------- Reporter: joe.dipol@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: -------------------------+-------------------------------- Because I'm behind an http proxy I'm using svn and not rsync to synchronize. I added the following to sources.conf: file://opt/local/var/macports/sources/svn.macports.org/trunk/dports/ But when I run sync it fails because it is using a bad path (note it is preceded with /opt/local/bin): mac$ ./port -d sync ---> Updating the ports tree Synchronizing local ports tree from file://opt/local/var/macports/sources/svn.macports.org/trunk/dports/ couldn't change working directory to "/opt/local/bin/opt/local/var/macports/sources/svn.macports.org/trunk/dports": no such file or directory Command failed: /opt/local/bin/portindex /opt/local/bin/opt/local/var/macports/sources/svn.macports.org/trunk/dports Exit code: 1 Error: updating PortIndex for file://opt/local/var/macports/sources/svn.macports.org/trunk/dports/ failed I think this is caused by an off by one error in macports.tcl:proc macports::getportdir The following change seems to fix the problem: set path [file normalize [string range $url [expr [string length $protocol] + 3] end]] to set path [file normalize [string range $url [expr [string length $protocol] + 2] end]] -- Ticket URL: <https://trac.macports.org/ticket/43717> MacPorts <http://www.macports.org/> Ports system for OS X