Skip to content

Commit

Permalink
For "port installed foo", make sure we report one way or another whet…
Browse files Browse the repository at this point in the history
…her foo is

installed. If it's not installed, state that. Behavior before this change was
to give no message for a port that was not installed, giving output only
for the installed ports.

This reverts more toward the behavior in 1.1, but I'm not sure it's completely
what we want.

"port installed a b c" might say:

port a is not installed
b 1.2 (active)
c 1.0

"port installed all" would tell you for each port whether it is installed or not.

Feedback welcome. Credit to Juan for reporting this change in behavior.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@14667 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jdberry committed Oct 17, 2005
1 parent 61fa0d7 commit dae5296
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/port/port.tcl
Expand Up @@ -2,7 +2,7 @@
#\ #\
exec @TCLSH@ "$0" "$@" exec @TCLSH@ "$0" "$@"
# port.tcl # port.tcl
# $Id: port.tcl,v 1.135 2005/10/13 04:41:13 jberry Exp $ # $Id: port.tcl,v 1.136 2005/10/17 00:45:14 jberry Exp $
# #
# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org> # Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
# Copyright (c) 2002 Apple Computer, Inc. # Copyright (c) 2002 Apple Computer, Inc.
Expand Down Expand Up @@ -1400,12 +1400,12 @@ switch -- $action {
installed { installed {
if { [llength $portlist] } { if { [llength $portlist] } {
set ilist {} set ilist {}
foreach portspec $portlist { foreachport $portlist {
array set port $portspec set composite_version [composite_version $portversion [array get variations]]
set portname $port(name)
set composite_version [composite_version $port(version) $port(variants)]
if { [catch {set ilist [concat $ilist [registry::installed $portname $composite_version]]} result] } { if { [catch {set ilist [concat $ilist [registry::installed $portname $composite_version]]} result] } {
if {![string match "* not registered as installed." $result]} { if {[string match "* not registered as installed." $result]} {
puts "Port $portname is not installed."
} else {
global errorInfo global errorInfo
ui_debug "$errorInfo" ui_debug "$errorInfo"
fatal_softcontinue "port installed failed: $result" fatal_softcontinue "port installed failed: $result"
Expand All @@ -1415,7 +1415,7 @@ switch -- $action {
} else { } else {
if { [catch {set ilist [registry::installed]} result] } { if { [catch {set ilist [registry::installed]} result] } {
if {$result == "Registry error: No ports registered as installed."} { if {$result == "Registry error: No ports registered as installed."} {
fatal "No ports installed!" puts "No ports are installed!"
} else { } else {
global errorInfo global errorInfo
ui_debug "$errorInfo" ui_debug "$errorInfo"
Expand Down

0 comments on commit dae5296

Please sign in to comment.