Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 211000 - sys-apps/portage: emerge should stop when cannot run a command due missing eclass
Summary: sys-apps/portage: emerge should stop when cannot run a command due missing ec...
Status: RESOLVED DUPLICATE of bug 138792
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-21 17:04 UTC by Pacho Ramos
Modified: 2008-02-22 09:28 UTC (History)
1 user (show)

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


Attachments
trap ERR (trap_err.sh,123 bytes, text/plain)
2008-02-22 09:21 UTC, Zac Medico
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2008-02-21 17:04:05 UTC
For example, if inherit eutils is missing, the following error will be shown:
/var/tmp/portage/***/***/temp/environment: line 701: epatch: command not found

But emerge will continue merging package that will result in, sometimes, a buggy app. 

I think that emerge should die like currently does when, for example, cannot apply a wrong patch

Thanks a lot

Reproducible: Always
Comment 1 Zac Medico gentoo-dev 2008-02-21 17:21:18 UTC

*** This bug has been marked as a duplicate of bug 138792 ***
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-02-21 17:27:04 UTC
Well, unless the other bug is meant to make _everything_ die by default on failure and not just the known wrappers mentioned there, this is not a dupe really. This one is meant to catch typos, missing inherits etc. resulting in "command not found" stuff.
Comment 3 Pacho Ramos gentoo-dev 2008-02-21 17:33:49 UTC
(In reply to comment #2)
> This one is meant to catch typos, missing inherits etc. resulting in
> "command not found" stuff.
> 

+1
Comment 4 Zac Medico gentoo-dev 2008-02-21 22:22:18 UTC
Oh, I see what you want, but it doesn't seem possible to fix. Ideas?
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-02-22 06:37:26 UTC
(In reply to comment #4)
> Oh, I see what you want, but it doesn't seem possible to fix. Ideas?

Well, unfortunately not ATM (beyond nasty stuff like grep emerge.log after each phase :P) but it'd be nice thing to have. *g*
Comment 6 Pacho Ramos gentoo-dev 2008-02-22 08:32:42 UTC
(In reply to comment #4)
> Oh, I see what you want, but it doesn't seem possible to fix. Ideas?
> 

I don't know much about these things :'( , but I have seen that adding a "die" to epatch line:
epatch ..... || die

Does the trick, Isn't there any way for do this by default, for not needing to add "die" to all ebuilds that use epatch?

Thanks a lot

___

Should I reopen this bug?
Comment 7 Zac Medico gentoo-dev 2008-02-22 09:21:45 UTC
Created attachment 144304 [details]
trap ERR

(In reply to comment #6)
> I don't know much about these things :'( , but I have seen that adding a "die"
> to epatch line:
> epatch ..... || die

That works but it's something that has to be done in the ebuild or eclass, not in portage. Also, note that the intention of bug 138792 is to eliminate the need for adding "|| die" in places like this.

Alternatively, we could use a trap to call die, as demonstrated in the attached script. This approach would be quite similar in effect to bug 138792 and would also require an EAPI bump since it would be incompatible with a majority of the current ebuilds and eclasses. I imagine that people who support the inclusion of bug 138792 would also be likely to support the trap approach since it is so similar.
Comment 8 Pacho Ramos gentoo-dev 2008-02-22 09:28:44 UTC
OK, thanks for info