Skip to content

Commit

Permalink
Abort when a port includes a nonexistent PortGroup (#169)
Browse files Browse the repository at this point in the history
* Abort when a port includes an invalid PortGroup

Currently, only a warning is printed and the processing of the port
continues. This typically results in a port not completing later.
After this patch, an error is printed with the port name added and
then the port processing aborts.

closes https//trac.macports.org/ticket/59787
  • Loading branch information
kurthindenburg committed Apr 24, 2020
1 parent 5037999 commit d913932
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/port1.0/portutil.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@ proc set_ui_prefix {} {

# Use a specified group/version.
proc PortGroup {group version} {
global porturl PortInfo _portgroup_search_dirs
global porturl PortInfo _portgroup_search_dirs subport

if {[info exists _portgroup_search_dirs]} {
foreach dir $_portgroup_search_dirs {
Expand All @@ -2579,8 +2579,8 @@ proc PortGroup {group version} {
uplevel "source $groupFile"
ui_debug "Sourcing PortGroup $group $version from $groupFile"
} else {
lappend PortInfo(portgroups) [list $group $version ""]
ui_warn "PortGroup ${group} ${version} could not be located. ${group}-${version}.tcl does not exist."
ui_error "${subport}: PortGroup ${group} ${version} could not be located. ${group}-${version}.tcl does not exist."
return -code error "PortGroup not found"
}
}

Expand Down

0 comments on commit d913932

Please sign in to comment.