[136510] trunk/base/src/macports1.0/macports.tcl
jmr at macports.org
jmr at macports.org
Tue May 19 19:06:21 PDT 2015
Revision: 136510
https://trac.macports.org/changeset/136510
Author: jmr at macports.org
Date: 2015-05-19 19:06:20 -0700 (Tue, 19 May 2015)
Log Message:
-----------
use correct path when extracting portfile from a local binary archive
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2015-05-20 01:48:06 UTC (rev 136509)
+++ trunk/base/src/macports1.0/macports.tcl 2015-05-20 02:06:20 UTC (rev 136510)
@@ -1499,7 +1499,7 @@
}
if {$local} {
- set fetchfile $url
+ set filepath $url
} else {
ui_msg "$macports::ui_prefix Fetching port $url"
set fetchfile [file tail $url]
@@ -1509,7 +1509,8 @@
} elseif {[info exists macports::ui_options(progress_download)]} {
set progressflag "--progress ${macports::ui_options(progress_download)}"
}
- if {[catch {curl fetch {*}$progressflag $url [file join $fetchdir $fetchfile]} result]} {
+ set filepath [file join $fetchdir $fetchfile]
+ if {[catch {curl fetch {*}$progressflag $url $filepath} result]} {
return -code error "Port remote fetch failed: $result"
}
}
@@ -1520,9 +1521,9 @@
# check if this is a binary archive or just the port dir by checking
# whether the file "+CONTENTS" exists.
set tarcmd [findBinary tar $macports::autoconf::tar_path]
- set tarflags [get_tar_flags [file extension $fetchfile]]
+ set tarflags [get_tar_flags [file extension $filepath]]
set qflag $macports::autoconf::tar_q
- set cmdline [list $tarcmd ${tarflags}${qflag}xOf $fetchfile +CONTENTS]
+ set cmdline [list $tarcmd ${tarflags}${qflag}xOf $filepath +CONTENTS]
ui_debug $cmdline
if {![catch {set contents [exec {*}$cmdline]}]} {
# the file is probably a valid binary archive
@@ -1550,9 +1551,9 @@
# extract the portfile (and possibly files dir if not a binary archive)
ui_debug "extracting port archive to [pwd]"
if {$binary} {
- set cmdline [list $tarcmd ${tarflags}${qflag}xOf ../$fetchfile +PORTFILE > Portfile]
+ set cmdline [list $tarcmd ${tarflags}${qflag}xOf $filepath +PORTFILE > Portfile]
} else {
- set cmdline [list $tarcmd ${tarflags}${qflag}xf $fetchfile]
+ set cmdline [list $tarcmd ${tarflags}${qflag}xf $filepath]
}
ui_debug $cmdline
if {[catch {exec {*}$cmdline} result]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150519/2b8230f2/attachment.html>
More information about the macports-changes
mailing list