baselayout: Add OEM lib directories to default search path

Although this shouldn't strictly be required, OEM binaries can use RPATH
or RUNPATH, there are plenty of corner cases that waste time. For
example if a library in OEM links to another OEM the linker verification
performed by build_packages won't catch it since RPATH would be provided
by the binary that happens to use those libraries, not the library files
themselves. Such tediousness isn't worth wasting more time over and as
long as OEM is after the normal system libraries this should be safe.
This commit is contained in:
Michael Marineau 2014-11-08 10:43:30 -08:00
parent 6a2f6197ce
commit a3c37d017b
2 changed files with 8 additions and 0 deletions

View File

@ -130,6 +130,14 @@ src_install() {
done done
echo "LDPATH='${ldpaths#:}'" >> "${D}"/etc/env.d/00basic || die echo "LDPATH='${ldpaths#:}'" >> "${D}"/etc/env.d/00basic || die
# Add oem/lib64 to search path towards end of the system's list.
# This simplifies the configuration of OEMs with dynamic libs.
ldpaths=
for libdir in $(get_all_libdirs) ; do
ldpaths+=":/usr/share/oem/${libdir}"
done
echo "LDPATH='${ldpaths#:}'" >> "${D}"/etc/env.d/80oem || die
if ! use symlink-usr ; then if ! use symlink-usr ; then
# modprobe uses /lib instead of /usr/lib # modprobe uses /lib instead of /usr/lib
mv "${D}"/usr/lib/modprobe.d "${D}"/lib/modprobe.d || die mv "${D}"/usr/lib/modprobe.d "${D}"/lib/modprobe.d || die