livecheck checking Portfile's homepage

Ryan Schmidt ryandesign at macports.org
Sat Jun 14 17:31:58 PDT 2014


On Jun 14, 2014, at 4:55 PM, Kurt Hindenburg wrote:

> I've noticed that more a few Portfile's have invalid homepage entries.  I hacked/copied/pasted portlivecheck.tcl to have livecheck output errors.  Is there already a way of doing this or a better way?

I'm not sure I understand completely. When you say invalid homepage, do you mean a homepage that returns a 404 not found error? or a web server that is offline? or a port having no homepage entry at all? And what is the behavior of livecheck currently in that situation, and what does your patch change it to be instead?

The correct solution, if a port has an invalid or bad homepage entry, is to correct the homepage entry.


> --- base/src/port1.0/portlivecheck.tcl  (revision 121019)
> +++ base/src/port1.0/portlivecheck.tcl  (working copy)
> @@ -87,6 +87,14 @@
>         return -code 1 "No available types were found. Check '$types_dir'."
>     }
> 
> +#kvh
> +    if {$has_homepage} {
> +        if {[catch {curl fetch {*}$curl_options ${livecheck.url} $tempfile} error]} {
> +            ui_msg "$subport : checking homepage ${livecheck.url}"
> +            ui_error "  $error"
> +        }
> +    }
> 




More information about the macports-dev mailing list