[OE-core] opkg intercept for ldconfig on oe-core
Ben Shelton
ben.shelton at ni.com
Fri Jan 30 23:06:09 UTC 2015
Hi all,
I was looking at the opkg intercept functionality, and if I'm understanding this
properly, it looks like it changes the PATH so that e.g. ldconfig is redirected
to the script under /usr/share/opkg/intercept/ldconfig when running postinst
scripts. That way, when installing a bunch of libraries, ldconfig can be run
once at the end rather than once for every package.
However, the postinst scripts for libraries are generated with
ldconfig_postinst_fragment() in meta/classes/package.bbclass, which looks like
this:
ldconfig_postinst_fragment() {
if [ x"$D" = "x" ]; then
if [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi
fi
}
Because this script uses the full absolute path to ldconfig, the opkg intercept
ldconfig script isn't being invoked. I verified this by putting an echo in
/usr/share/opkg/intercept/ldconfig, which I saw only when I changed my package's
postinst script to
ldconfig_postinst_fragment() {
if [ x"$D" = "x" ]; then
ldconfig
fi
}
In the history of package.bbclass, it originally used to look like this, but was
changed in 2008 in a sync from OE.dev.
Is this expected behavior? Is opkg intercept still supported? Should we fix
this, and if so, what would be a safe way to do it?
Thanks,
Ben
More information about the Openembedded-core
mailing list