I have noticed the following while processing net-misc/omniORB-305.ebuild: (however the issue seems to be not omniORB related) host# emerge -b omniORB [long build and install skipped] Performing post-installation routines for omniORB-305. /usr/bin/python: can't open file '/var/tmp/portage-pkg/omniORB-305/inf/files/mkomnistubs.py' the same happens if I do ebuild omniORB-305.ebuild qmerge (after processing the ebuild PN-PV.ebuild unpack compile install) When I do "emerge omniORB" (no -b, just plain emerge) everything is fine. The relevant lines in ebuild: pkg_postinst() { echo "Performing post-installation routines for ${P}." if [ ! -f "${ROOT}etc/omniorb/omniORB.cfg" ] ; then echo "ORBInitialHost `uname -n`" > ${ROOT}etc/omniorb/omniORB.cfg echo "ORBInitialPort 2809" >> ${ROOT}etc/omniorb/omniORB.cfg fi /usr/bin/python ${FILESDIR}/mkomnistubs.py } The last line in the function is the one where "emerge -b" or ebuild complain. Apparently FILESDIR gets assigned the path under /var/tmp/${PF} (possibly starting the seacrh/assignment in local dir) instead of ${PORTAGEROOT}/cat/pkg/files. I tries to put "echo $FILESDIR" right before the problemmatic line. This confirms misassignment by ebuild and emerge -b, while plain emerge assigns correct value. This was observed with portage 2.0.27, 2.0.26 and may go a while back. George
${FILESDIR} can't be used in pkg_postinst() and friends; if we are installing from .tbz2 then we have no filesdir since we can't depend on the right files being in /usr/portage/cat/pkg/files/ in the rsync tree. If you need to run "mkomnistubs.py" as it appears you do, then you need to install it to some location on the real filesystem in src_install(), and then you can run it in pkg_postinst(). ie: src_install() { exeinto /usr/share/doc/${PF} doexe ${FILESDIR}/mkomnistubs.py ... } pkg_postinst() { /usr/bin/python2.2 ${ROOT}usr/share/doc/${PF}/mkomnistubs.py } Or something like that. Assigning back to you....
Fixed and unmasked omniORB-305, closing this bug. George