Summary: | portage does not handle broken ebuilds nicely | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Harald van Dijk (RETIRED) <truedfx> |
Component: | Unclassified | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | High | ||
Version: | 2.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 200044 |
Description
Harald van Dijk (RETIRED)
2007-11-25 18:58:31 UTC
Aside from using a modified version of bash or some other shell implementation, I'm not sure if this can be fixed. For example, doing this in ebuild.sh doesn't seem to help: src_compile || die "src_compile failed" Apparently the shell exits with status 0 before the die call is even reached! Maybe that's a bug in bash that we should report upstream. Even if checking the return value of the ebuild phase does help in a new version of bash, we might have to do an EAPI bump if we want to force all ebuild phases to return 0 on success. Here is how it's now fixed in svn: We use a EBUILD_EXIT_STATUS_FILE environment variable to specify a file that the shell code is supposed to create when it exits in a normal manner. If the file does not get created like it's supposed to be then we can conclude that the shell has exited in some unexpected way. Thanks. This seems pretty similar to the way ebuild(1) behaves when passing all commands separately: ebuild /etc/portage/overlay/test/test/test-1.0.ebuild clean setup unpack compile install qmerge * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Unpacking source... >>> Source unpacked. * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Compiling source in /var/tmp/portage/test/test-1.0/work ... >>> Source compiled. * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Install test-1.0 into /var/tmp/portage/test/test-1.0/image/ category test /var/tmp/portage/test/test-1.0/temp/environment: line 165: ${$PV}: bad substitution * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] !!! mydo=qmerge, but the install phase has not been run Since .installed has not been created, ebuild won't merge. This has been released in portage-2.1.4_rc4. |