[70975] trunk/base/src/port1.0/portlivecheck.tcl
Revision: 70975 http://trac.macports.org/changeset/70975 Author: raimue@macports.org Date: 2010-08-28 17:35:07 -0700 (Sat, 28 Aug 2010) Log Message: ----------- livecheck: Add livecheck.ignore_sslcert, no longer use fetch.* settings as they are meant to apply to another URL. A password protected livecheck would be quite uncommon, therefore removing this option. #17063 Modified Paths: -------------- trunk/base/src/port1.0/portlivecheck.tcl Modified: trunk/base/src/port1.0/portlivecheck.tcl =================================================================== --- trunk/base/src/port1.0/portlivecheck.tcl 2010-08-29 00:13:12 UTC (rev 70974) +++ trunk/base/src/port1.0/portlivecheck.tcl 2010-08-29 00:35:07 UTC (rev 70975) @@ -46,7 +46,7 @@ } # define options -options livecheck.url livecheck.type livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version +options livecheck.url livecheck.type livecheck.check livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version livecheck.ignore_sslcert # defaults default livecheck.url {$homepage} @@ -57,13 +57,14 @@ default livecheck.name default default livecheck.distname default default livecheck.version {$version} +default livecheck.ignore_sslcert yes # Deprecation option_deprecate livecheck.check livecheck.type proc portlivecheck::livecheck_main {args} { global livecheck.url livecheck.type livecheck.md5 livecheck.regex livecheck.name livecheck.distname livecheck.version - global fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert + global livecheck.ignore_sslcert global homepage portpath workpath global master_sites name distfiles @@ -78,18 +79,10 @@ ui_debug "Portfile modification date is [clock format $port_moddate]" ui_debug "Port (livecheck) version is ${livecheck.version}" - # 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}" + set curl_options {} + if [tbool ${livecheck.ignore_sslcert}] { + lappend curl_options "--ignore-ssl-cert" } - if {${fetch.use_epsv} != "yes"} { - lappend fetch_options "--disable-epsv" - } - if {${fetch.ignore_sslcert} != "no"} { - lappend fetch_options "--ignore-ssl-cert" - } # Check _resources/port1.0/livecheck for available types. set types_dir [getdefaultportresourcepath "port1.0/livecheck"] @@ -148,7 +141,7 @@ "regexm" { # single and multiline regex ui_debug "Fetching ${livecheck.url}" - if {[catch {eval curl fetch $fetch_options {${livecheck.url}} $tempfile} error]} { + if {[catch {eval curl fetch $curl_options {${livecheck.url}} $tempfile} error]} { ui_error "cannot check if $name was updated ($error)" set updated -1 } else { @@ -197,7 +190,7 @@ } "md5" { ui_debug "Fetching ${livecheck.url}" - if {[catch {eval curl fetch $fetch_options {${livecheck.url}} $tempfile} error]} { + if {[catch {eval curl fetch $curl_options {${livecheck.url}} $tempfile} error]} { ui_error "cannot check if $name was updated ($error)" set updated -1 } else {
participants (1)
-
raimue@macports.org