On 6/14/14, 8:31 PM, Ryan Schmidt wrote:
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?
Yes, the homepage urls are in the Portfile and there's some issue connecting to it. As far as I can tell, the current livecheck checks the livecheck.url (which appears to be the master_site most of the time). I didn't see anything that checks the homepage url. With my patch, livecheck also checks homepage (it is a hack/copy/paste).
The correct solution, if a port has an invalid or bad homepage entry, is to 
correct the homepage entry.

I agree but I don't see any automated way of checking to find invalid homepage urls. I was more asking for comments about this issue rather than suggesting using the patch.

Example:
jbigkit : checking homepage http://www.cl.cam.ac.uk/~mgk25/jbigkit/download/
Error:   Failed to connect to 2001:630:212:200::80:14: No route to host
Error: cannot check if jbigkit was updated (Failed to connect to 2001:630:212:200::80:14: No route to host)

jpeg : checking homepage http://www.ijg.org/files/
Error:   The requested URL returned error: 403 Forbidden


 Kurt

--- 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"
+        }
+    }



_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to