Opened 12 years ago

Closed 12 years ago

#32384 closed defect (fixed)

watch @3.2.8_1 fails to perform a livecheck

Reported by: nonstop.server@… Owned by: mjhsieh@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: haspatch Cc: ryandesign (Ryan Carsten Schmidt)
Port: watch

Description

Port watch fails to perform a livecheck.

% port -v livecheck watch 
Error: cannot check if watch was updated (The requested URL returned error: 406)

Setting variables livecheck.regex, livecheck.type, and livecheck.url seems to do the trick.

% port -d livecheck watch \
> livecheck.regex='procps-(\[0-9.\]*)\.tar\.gz' \
> livecheck.type=regex \
> livecheck.url=http://procps.sourceforge.net/
<snip output for brevity>
DEBUG: livecheck phase started at Sat Dec  3 16:27:55 CET 2011
DEBUG: Executing org.macports.livecheck (watch)
DEBUG: Portfile modification date is Wed Sep 22 07:30:46 CEST 2010
DEBUG: Port (livecheck) version is 3.2.8
DEBUG: Fetching http://procps.sourceforge.net/
DEBUG: The regex is "procps-([0-9.]*).tar.gz"
DEBUG: The regex matched "procps-3.2.8.tar.gz", extracted "3.2.8"
watch seems to be up to date

Attachments (2)

watch.diff (343 bytes) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
proposed patch
watch.diffv2 (544 bytes) - added by mjhsieh@… 12 years ago.
patch with minor modifications

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added; mjhsieh@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to mjhsieh@…

Thanks. In the future, providing an actual diff would be more useful. I've attached one and it works for me. mjhsieh, may I commit it?

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: watch.diff added

proposed patch

comment:2 in reply to:  1 ; Changed 12 years ago by nonstop.server@…

Replying to ryandesign@…:

Thanks. In the future, providing an actual diff would be more useful. I've attached one and it works for me. mjhsieh, may I commit it?

Thanks for the tip, I'll create a difference report next time.
I forgot to disregard the special meaning of '.' in the grouping part of the regular expression.
This would be more specific: procps-(\[0-9\.\]*)\.tar\.gz

Changed 12 years ago by mjhsieh@…

Attachment: watch.diffv2 added

patch with minor modifications

comment:3 in reply to:  1 Changed 12 years ago by mjhsieh@…

Replying to ryandesign@…:

Thanks. In the future, providing an actual diff would be more useful. I've attached one and it works for me. mjhsieh, may I commit it?

Sorry for the late reply, was out of town... Yes, please commit it.

comment:4 in reply to:  2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Replying to nonstop.server@…:

This would be more specific: procps-(\[0-9\.\]*)\.tar\.gz

There is no need to escape a . that's inside a [character class]. Technically escaping the .'s in ${extract.suffix} would be most correct. However I find it advantageous to be able to write ${extract.suffix} and not have to remember what suffix this particular port is using. Committed my patch in r87751.

Note: See TracTickets for help on using tickets.