[152663] branches/release_2_3/base
raimue at macports.org
raimue at macports.org
Wed Sep 14 06:59:54 PDT 2016
Revision: 152663
https://trac.macports.org/changeset/152663
Author: raimue at macports.org
Date: 2016-09-14 06:59:54 -0700 (Wed, 14 Sep 2016)
Log Message:
-----------
merge r127797 from trunk:
generate an error when livecheck finds an older version than is currently in the portfile, instead of saying that the older version is newer (#17041)
merge r149299 from trunk:
livecheck: report error if matched version is old
Applying the same message to 'livecheck.type regexm' that was already
introduced for 'regex' in r127797.
Revision Links:
--------------
https://trac.macports.org/changeset/127797
https://trac.macports.org/changeset/149299
https://trac.macports.org/changeset/127797
Modified Paths:
--------------
branches/release_2_3/base/src/port1.0/portlivecheck.tcl
Property Changed:
----------------
branches/release_2_3/base/
branches/release_2_3/base/src/
Property changes on: branches/release_2_3/base
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,136965,137850,138461,138530,138749,139270,140693,140724,141134,141412,145037,145162,146644,147347,147456,148084,149529,150305,152447
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
+ /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,127797,128113,128274,128276,128422,134501-134502,134511,136965,137850,138461,138530,138749,139270,140693,140724,141134,141412,145037,145162,146644,147347,147456,148084,149299,149529,150305,152447
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
Property changes on: branches/release_2_3/base/src
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base/src:37343-46937
/branches/gsoc09-logging/base/src:51231-60371
/branches/gsoc11-rev-upgrade/base/src:78828-88375
/branches/gsoc11-statistics/base/src:79520,79666
/branches/gsoc13-tests/src:106692-111324
/branches/universal-sanity/base/src:51872-52323
/branches/variant-descs-14482/base/src:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,135851,136965,137850,138461,138530,138749,139270,141134,141412,145037,145162,146644,147347,147456,148084,150305,152447
/users/perry/base-bugs_and_notes/src:45682-46060
/users/perry/base-select/src:44044-44692
+ /branches/gsoc08-privileges/base/src:37343-46937
/branches/gsoc09-logging/base/src:51231-60371
/branches/gsoc11-rev-upgrade/base/src:78828-88375
/branches/gsoc11-statistics/base/src:79520,79666
/branches/gsoc13-tests/src:106692-111324
/branches/universal-sanity/base/src:51872-52323
/branches/variant-descs-14482/base/src:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,127797,128113,128274,128276,128422,134501-134502,134511,135851,136965,137850,138461,138530,138749,139270,141134,141412,145037,145162,146644,147347,147456,148084,149299,150305,152447
/users/perry/base-bugs_and_notes/src:45682-46060
/users/perry/base-select/src:44044-44692
Modified: branches/release_2_3/base/src/port1.0/portlivecheck.tcl
===================================================================
--- branches/release_2_3/base/src/port1.0/portlivecheck.tcl 2016-09-14 13:50:58 UTC (rev 152662)
+++ branches/release_2_3/base/src/port1.0/portlivecheck.tcl 2016-09-14 13:59:54 UTC (rev 152663)
@@ -144,28 +144,32 @@
"regexm" {
# single and multiline regex
ui_debug "Fetching ${livecheck.url}"
- if {[catch {eval curl fetch $curl_options {${livecheck.url}} $tempfile} error]} {
+ set updated -1
+ if {[catch {curl fetch {*}$curl_options ${livecheck.url} $tempfile} error]} {
ui_error "cannot check if $subport was updated ($error)"
- set updated -1
} else {
# let's extract the version from the file.
set chan [open $tempfile "r"]
- set updated -1
+ set foundmatch 0
set the_re [join ${livecheck.regex}]
ui_debug "The regex is \"$the_re\""
- if {${livecheck.type} == "regexm"} {
+ if {${livecheck.type} eq "regexm"} {
set data [read $chan]
if {[regexp $the_re $data matched updated_version]} {
- if {$updated_version != ${livecheck.version}} {
- set updated 1
+ set foundmatch 1
+ ui_debug "The regex matched \"$matched\", extracted \"$updated_version\""
+ if {$updated_version ne ${livecheck.version}} {
+ if {[vercmp $updated_version ${livecheck.version}] > 0} {
+ set updated 1
+ } else {
+ ui_error "livecheck failed for ${subport}: extracted version '$updated_version' is older than livecheck.version '${livecheck.version}'"
+ }
} else {
set updated 0
}
- ui_debug "The regex matched \"$matched\", extracted \"$updated_version\""
}
} else {
set updated_version 0
- set foundmatch 0
while {[gets $chan line] >= 0} {
set lastoff 0
while {[regexp -start $lastoff -indices $the_re $line offsets]} {
@@ -179,17 +183,19 @@
}
}
if {$foundmatch == 1} {
- if {$updated_version == 0} {
- set updated -1
- } elseif {$updated_version != ${livecheck.version}} {
- set updated 1
+ if {$updated_version ne ${livecheck.version}} {
+ if {[vercmp $updated_version ${livecheck.version}] > 0} {
+ set updated 1
+ } else {
+ ui_error "livecheck failed for ${subport}: extracted version '$updated_version' is older than livecheck.version '${livecheck.version}'"
+ }
} else {
set updated 0
}
}
}
close $chan
- if {$updated < 0} {
+ if {!$foundmatch} {
ui_error "cannot check if $subport was updated (regex didn't match)"
}
}
@@ -202,7 +208,7 @@
} else {
# let's compute the md5 sum.
set dist_md5 [md5 file $tempfile]
- if {$dist_md5 != ${livecheck.md5}} {
+ if {$dist_md5 ne ${livecheck.md5}} {
ui_debug "md5sum for ${livecheck.url}: $dist_md5"
set updated 1
}
@@ -229,7 +235,7 @@
file delete -force $tempfile
- if {${livecheck.type} != "none"} {
+ if {${livecheck.type} ne "none"} {
if {$updated > 0} {
ui_msg "$subport seems to have been updated (port version: ${livecheck.version}, new version: $updated_version)"
} elseif {$updated == 0} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160914/a916ba30/attachment-0001.html>
More information about the macports-changes
mailing list