[24619] branches/dp2mp-move/base/src/port/port.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Sat Apr 28 19:06:54 PDT 2007
Revision: 24619
http://trac.macosforge.org/projects/macports/changeset/24619
Author: jmpp at macports.org
Date: 2007-04-28 19:06:54 -0700 (Sat, 28 Apr 2007)
Log Message:
-----------
Merging r24551 and r24555: New 'gohome' command in port(1) (homepage command killed). As of this commit, the dp2mp-move branch again mirrors trunk @ r24618.
Modified Paths:
--------------
branches/dp2mp-move/base/src/port/port.tcl
Modified: branches/dp2mp-move/base/src/port/port.tcl
===================================================================
--- branches/dp2mp-move/base/src/port/port.tcl 2007-04-29 02:06:09 UTC (rev 24618)
+++ branches/dp2mp-move/base/src/port/port.tcl 2007-04-29 02:06:54 UTC (rev 24619)
@@ -1883,19 +1883,20 @@
set status 0
require_portlist portlist
foreachport $portlist {
+ # Verify the portname, getting portinfo to map to a porturl
+ if {[catch {set res [dportsearch $portname no exact]} result]} {
+ global errorInfo
+ ui_debug "$errorInfo"
+ break_softcontinue "search for portname $portname failed: $result" 1 status
+ }
+ if {[llength $res] < 2} {
+ break_softcontinue "Port $portname not found" 1 status
+ }
+ array set portinfo [lindex $res 1]
+
# If we have a url, use that, since it's most specific
# otherwise try to map the portname to a url
if {$porturl == ""} {
- # Verify the portname, getting portinfo to map to a porturl
- if {[catch {set res [dportsearch $portname no exact]} result]} {
- global errorInfo
- ui_debug "$errorInfo"
- break_softcontinue "search for portname $portname failed: $result" 1 status
- }
- if {[llength $res] < 2} {
- break_softcontinue "Port $portname not found" 1 status
- }
- array set portinfo [lindex $res 1]
set porturl $portinfo(porturl)
}
@@ -1967,6 +1968,17 @@
# output the path to the port's portfile
puts $portfile
}
+
+ gohome {
+ set homepage $portinfo(homepage)
+ if { $homepage != "" } {
+ # TODO we should autoconfigure this, and perhaps leave an option for
+ # a different command to visit the homepage
+ system "/usr/bin/open $homepage"
+ } else {
+ puts "(no homepage)"
+ }
+ }
}
} else {
break_softcontinue "Could not read $portfile" 1 status
@@ -2135,6 +2147,7 @@
cd action_portcmds
url action_portcmds
file action_portcmds
+ gohome action_portcmds
depends action_target
fetch action_target
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070428/887efd95/attachment.html
More information about the macports-changes
mailing list