Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 613742 - corrupt/invalid ebuilds should be made fatal at the emerge level
Summary: corrupt/invalid ebuilds should be made fatal at the emerge level
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-24 21:22 UTC by SpanKY
Modified: 2017-03-24 21:56 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 SpanKY gentoo-dev 2017-03-24 21:22:40 UTC
currently emerge will remove an ebuild from the depgraph if it's invalid which means it might automatically fallback to a different version.  it'd be preferable in some (all?) scenarios to have emerge just abort.

we should start with making it fatal all the time and see if anyone complains and wants a way of making it fallback.

example:
$ emerge -pq --nodeps app-editors/nano
[ebuild   R   ] app-editors/nano-2.7.5

$ echo '{' >> /usr/portage/app-editors/nano/nano-2.7.5.ebuild 
$ emerge -pq --nodeps app-editors/nano
/usr/portage/app-editors/nano/nano-2.7.5.ebuild: line 85: syntax error: unexpected end of file
 * ERROR: app-editors/nano-2.7.5::gentoo failed (depend phase):
 *   error sourcing ebuild
 * 
 * Call stack:
 *   ebuild.sh, line 611:  Called die
 * The specific snippet of code:
 *                      source "$EBUILD" || die "error sourcing ebuild"
 * 
 * If you need support, post the output of `emerge --info '=app-editors/nano-2.7.5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-editors/nano-2.7.5::gentoo'`.
 * Working directory: '/usr/lib64/python2.7/site-packages'
 * S: '/var/tmp/portage/app-editors/nano-2.7.5/work/nano-2.7.5'
[ebuild     UD] app-editors/nano-2.7.4 [2.7.5]
$ echo $?
0

emerge shouldn't have bothered suggesting nano-2.7.4 at all.  just give up and stay dead.
Comment 1 Zac Medico gentoo-dev 2017-03-24 21:56:25 UTC
We can make the portdbapi.aux_get method raise a special subclass of PortageKeyError in this case, and the depgraph._pkg method can handle it as a fatal error.