Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551152 (bad-nonfatal) - [TRACKER] Incorrect uses of nonfatal
Summary: [TRACKER] Incorrect uses of nonfatal
Status: CONFIRMED
Alias: bad-nonfatal
Product: Quality Assurance
Classification: Unclassified
Component: Trackers (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard:
Keywords: Tracker
Depends on: 517976 551154 551156 551158 551160 551162 551164 551166 551168 551170 551172 551174 551178 551180 551182 551184 551186 551188 551190 551196 551198 551200
Blocks:
  Show dependency tree
 
Reported: 2015-06-04 08:52 UTC by Michał Górny
Modified: 2021-07-21 00:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-06-04 08:52:37 UTC
Ebuilds are full of nonfatal mistakes, so let's start complaining.

Common issues:

1. using nonfatal to ignore faulty ebuild code/laziness -- like 'nonfatal dodoc A B C D',

2. using nonfatal with stuff that calls 'die' (relying on Portage bugs).
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-06-04 09:32:22 UTC
Just to be clear, the correct way of using nonfatal is to disable implicit 'die' call in built-in helpers (like emake), in order to handle the error manually. For example, to perform some additional cleanup before dying or provide custom error message.

Example:

  src_test() {
    food --pidfile "${T}/food.pid"
    nonfatal emake check
    local ret=${?}
    kill "$(<"${T}"/food.pid)"
    [[ ${ret} == 0 ]] || die "Tests fail, oh my"
  }