Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 586058 - dev-util/pkgcheck: warn on redundant || die for EAPI >= 4 builtins/helper utilities
Summary: dev-util/pkgcheck: warn on redundant || die for EAPI >= 4 builtins/helper uti...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PkgCore (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: PkgCore project
URL: https://devmanual.gentoo.org/ebuild-w...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-15 22:23 UTC by Jonas Stein
Modified: 2022-10-15 01:17 UTC (History)
2 users (show)

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 Jonas Stein gentoo-dev 2016-06-15 22:23:08 UTC
https://devmanual.gentoo.org/ebuild-writing/eapi/

explains:
utilities die on their own since EAPI=4

To me this means, that EAPI>=4 ebuilds should avoid doman || die 'doman failed' and let portage control how they die. Besides that it makes the ebuild shorter.

I suggest to add a non fatal repoman warning (for bad style) for this.

grep "do... " -R /usr/portage/*-*  | grep "||" | cut -f1 -d":" | xargs grep "EAPI=" | egrep "EAPI=\"*[4-6]" 

lists 1476 ebuilds (a few false positives may be included) using constructions like
doman foo.1 || die 'doman failed'
dobin foo || die 'dobin failed'

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:29 UTC
repoman support has been removed per bug 835013.

Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.