Opened 10 years ago
Last modified 10 years ago
#43717 closed defect
./port -d sync fails when using "file:" protocol — at Version 1
Reported by: | joe.dipol@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.2.1 |
Keywords: | Cc: | ||
Port: |
Description (last modified by mf2k (Frank Schima))
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]]
Change History (1)
comment:1 Changed 10 years ago by mf2k (Frank Schima)
Component: | ports → base |
---|---|
Description: | modified (diff) |
Note: See
TracTickets for help on using
tickets.
In the future, please use WikiFormatting.