[41404] trunk/base/src/port1.0/portlivecheck.tcl
raimue at macports.org
raimue at macports.org
Sat Nov 1 15:39:43 PDT 2008
Revision: 41404
http://trac.macports.org/changeset/41404
Author: raimue at macports.org
Date: 2008-11-01 15:39:42 -0700 (Sat, 01 Nov 2008)
Log Message:
-----------
port1.0/portlivecheck.tcl:
Fix livecheck if using https with invalid certificates, passive ftp, or username and password
Modified Paths:
--------------
trunk/base/src/port1.0/portlivecheck.tcl
Modified: trunk/base/src/port1.0/portlivecheck.tcl
===================================================================
--- trunk/base/src/port1.0/portlivecheck.tcl 2008-11-01 21:59:21 UTC (rev 41403)
+++ trunk/base/src/port1.0/portlivecheck.tcl 2008-11-01 22:39:42 UTC (rev 41404)
@@ -56,6 +56,7 @@
proc livecheck_main {args} {
global livecheck.url livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version
+ global fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert
global homepage portname portpath workpath
global master_sites name distfiles
@@ -105,6 +106,19 @@
set livecheck.name $name
}
+ # Copied over from portfetch in parts
+ set fetch_options {}
+ if {[string length ${fetch.user}] || [string length ${fetch.password}]} {
+ lappend fetch_options -u
+ lappend fetch_options "${fetch.user}:${fetch.password}"
+ }
+ if {${fetch.use_epsv} != "yes"} {
+ lappend fetch_options "--disable-epsv"
+ }
+ if {${fetch.ignore_sslcert} != "no"} {
+ lappend fetch_options "--ignore-ssl-cert"
+ }
+
# Perform the check depending on the type.
switch ${livecheck.check} {
"freshmeat" {
@@ -162,7 +176,7 @@
"regexm" {
# single and multiline regex
ui_debug "Fetching ${livecheck.url}"
- if {[catch {curl fetch ${livecheck.url} $tempfile} error]} {
+ if {[catch {eval curl fetch $fetch_options {${livecheck.url}} $tempfile} error]} {
ui_error "cannot check if $portname was updated ($error)"
set updated -1
} else {
@@ -211,7 +225,7 @@
}
"md5" {
ui_debug "Fetching ${livecheck.url}"
- if {[catch {curl fetch ${livecheck.url} $tempfile} error]} {
+ if {[catch {eval curl fetch $fetch_options {${livecheck.url}} $tempfile} error]} {
ui_error "cannot check if $portname was updated ($error)"
set updated -1
} else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081101/1af92991/attachment-0001.html>
More information about the macports-changes
mailing list