portage
portage copied to clipboard
Print a QA warning if nonfatal is used without dying
I guess technically the code is fine, but I wonder if there aren't legitimate uses of nonfatal without die.
Especially, ebuilds seem to make use of the feature in src_test. See for example toolchain.eclass which ignores return status but compares with reference output instead.
Edit: In fact, the devmanual has a legitimate example:
src_test() {
if nonfatal emake check -n &> /dev/null; then
emake check
elif nonfatal emake test -n &> /dev/null; then
emake test
fi
}
I agree with @ulm on this; it's not terribly difficult to come up with a use case where using nonfatal without calling die makes sense.