[142486] trunk/dports/_resources/port1.0/group/compilers-1.0.tcl
dstrubbe at macports.org
dstrubbe at macports.org
Sat Dec 12 05:57:44 PST 2015
Revision: 142486
https://trac.macports.org/changeset/142486
Author: dstrubbe at macports.org
Date: 2015-11-12 16:28:22 -0800 (Thu, 12 Nov 2015)
Log Message:
-----------
compilers portgroup: Better error-handling -- if use of active_variants fails, we should write an error (for the enforce processes), or write a warning (for the active_variant_name processes, since I am not certain there is no use case for calling it like that). This will help catch bugs in Portfiles, e.g. misspelling, bad despec syntax, etc.
Modified Paths:
--------------
trunk/dports/_resources/port1.0/group/compilers-1.0.tcl
Modified: trunk/dports/_resources/port1.0/group/compilers-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/compilers-1.0.tcl 2015-11-13 00:12:41 UTC (rev 142485)
+++ trunk/dports/_resources/port1.0/group/compilers-1.0.tcl 2015-11-13 00:28:22 UTC (rev 142486)
@@ -329,6 +329,8 @@
if {$result} {
return $c
}
+ } else {
+ ui_warn "c_active_variant_name: [active_variants $depspec $fc \"\"] fails."
}
}
@@ -360,6 +362,8 @@
if {$result} {
return $fc
}
+ } else {
+ ui_warn "fortran_active_variant_name: [active_variants $depspec $fc \"\"] fails."
}
}
@@ -507,6 +511,9 @@
ui_error "Install $portname +$mycomp"
return -code error "$portname +$mycomp not installed"
}
+ } else {
+ ui_error "Internal error: compilers.enforce_c: '$portname' is not an installed port."
+ return -code error "Internal error: compilers.enforce_c: '$portname' is not an installed port."
}
}
}
@@ -536,7 +543,10 @@
ui_error "Install $portname +$myf"
return -code error "$portname +$myf not installed"
}
- }
+ } else {
+ ui_error "Internal error: compilers.enforce_fortran: '$portname' is not an installed port."
+ return -code error "Internal error: compilers.enforce_fortran: '$portname' is not an installed port."
+ }
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/b18fe95d/attachment.html>
More information about the macports-changes
mailing list