Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 6266 - ebuild name-PV.ebuild qmerge assignes incorrect value to FILESDIR
Summary: ebuild name-PV.ebuild qmerge assignes incorrect value to FILESDIR
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: George Shapovalov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-09 17:01 UTC by George Shapovalov (RETIRED)
Modified: 2011-10-30 22:18 UTC (History)
1 user (show)

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 George Shapovalov (RETIRED) gentoo-dev 2002-08-09 17:01:55 UTC
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
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-08-18 19:56:29 UTC
${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....
Comment 2 George Shapovalov (RETIRED) gentoo-dev 2002-09-02 13:12:58 UTC
Fixed and unmasked omniORB-305, closing this bug.

George