Okay, I found a very strange bug which is driving me mad because I simply can't find out why it happens: 1. emerge -C a package (e.g. gentoo-syntax) 2. emerge -K gentoo-syntax 3. notice that the ebuild can't be sourced during setup phase # emerge -K /usr/portage/packages/All/gentoo-syntax-20051221.tbz2 emerging by path implies --oneshot... adding --oneshot to options. *** emerging by path is broken and may not always work!!! Calculating dependencies... done! >>> Emerging (1 of 1) app-vim/gentoo-syntax-20051221 to / >>> Extracting info /usr/lib/portage/bin/ebuild.sh: line 1843: /var/db/pkg/app-vim/gentoo-syntax-20051221/gentoo-syntax-20051221.ebuild: No such file or directory !!! ERROR: app-vim/gentoo-syntax-20051221 failed. Call stack: !!! error sourcing ebuild !!! If you need support, post the topmost build error, and the call stack if relevant. >>> Extracting gentoo-syntax-20051221 >>> Merging app-vim/gentoo-syntax-20051221 to / * Removing /usr/share/info --- /usr/ --- /usr/share/ --- /usr/share/doc/ note the strange /var/db/pkg path for a BINPKG. This doesn't make much sense, does it? Now let's add some debug information: print "%s" % mydo print "%s" % myebuild to doebuild in portage.py and echo ${EBUILD} in ebuild.sh: # emerge -K /usr/portage/packages/All/gentoo-syntax-20051221.tbz2 emerging by path implies --oneshot... adding --oneshot to options. *** emerging by path is broken and may not always work!!! Calculating dependencies... done! >>> Emerging (1 of 1) app-vim/gentoo-syntax-20051221 to / >>> Extracting info setup /var/tmp/portage-pkg/gentoo-syntax-20051221/inf/gentoo-syntax-20051221.ebuild /var/db/pkg/app-vim/gentoo-syntax-20051221/gentoo-syntax-20051221.ebuild /usr/lib/portage/bin/ebuild.sh: line 1893: /var/db/pkg/app-vim/gentoo-syntax-20051221/gentoo-syntax-20051221.ebuild: No such file or directory !!! ERROR: app-vim/gentoo-syntax-20051221 failed. Call stack: !!! error sourcing ebuild !!! If you need support, post the topmost build error, and the call stack if relevant. >>> Extracting gentoo-syntax-20051221 >>> Merging app-vim/gentoo-syntax-20051221 to / preinst /var/tmp/portage-pkg/gentoo-syntax-20051221/inf/gentoo-syntax-20051221.ebuild /var/tmp/portage-pkg/gentoo-syntax-20051221/inf/gentoo-syntax-20051221.ebuild * Removing /usr/share/info --- /usr/ --- /usr/share/ --- /usr/share/doc/ how does this make sense? apparently the mysettings["EBUILD"] = ebuild_path doesn't make it immediately into the env. it only happens for the setup phase, all following phases show correct values tested with r2821-svn and 2.1_pre5-r4
I came across this one while working on my tinderbox setup. Don't know if I remember correctly, but it's because ${T} is set and contains an old environment file, which is sourced by ebuild.sh. The old environment overrides EBUILD and the sourcing of the ebuild fails. I fixed it by: --- ebuild.sh.orig 2006-03-07 20:29:41.877561651 +0000 +++ ebuild.sh 2006-02-14 11:33:04.025289539 +0000 @@ -11,7 +11,7 @@ SANDBOX_PREDICT="${SANDBOX_PREDICT}:${PORTAGE_GPG_DIR}" fi -if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "nofetch" ]; then +if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "nofetch" ] && [ "$*" != "setup" ]; then if [ -f "${T}/environment" ]; then source "${T}/environment" &>/dev/null fi
I plan to fix this in the near future. You should be able to work around it with `rm -rf $(portageq envvar PORTAGE_TMPDIR)/portage/*`. *** This bug has been marked as a duplicate of 85803 ***