Why implement this as a rootfs postinstall command? glibc writes this file, so we can alter it when that recipe is written.
Ross On 31 August 2017 at 06:54, <[email protected]> wrote: > From: Jackie Huang <[email protected]> > > There are advantages in changing the contents of ld.so.conf to > "include /etc/ld.so.conf.d/*.conf" instead of directly listing > directories in it, just like most distributions are doing the same. > > Signed-off-by: Jackie Huang <[email protected]> > --- > meta/classes/rootfs-postcommands.bbclass | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/meta/classes/rootfs-postcommands.bbclass > b/meta/classes/rootfs-postcommands.bbclass > index dc5a76baba..af01eb550a 100644 > --- a/meta/classes/rootfs-postcommands.bbclass > +++ b/meta/classes/rootfs-postcommands.bbclass > @@ -20,6 +20,9 @@ ROOTFS_POSTPROCESS_COMMAND += > '${@bb.utils.contains("IMAGE_FEATURES", "read-only > # Generates test data file with data store variables expanded in json > format > ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; " > > +# Add support for /etc/ld.so.conf.d/*.conf if ldconfig is enabled > +ROOTFS_POSTINSTALL_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', > 'ldconfig', 'add_ld_so_conf_d ;', '', d)}" > + > # Write manifest > IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest" > ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; " > @@ -244,6 +247,16 @@ make_zimage_symlink_relative () { > fi > } > > +# Add support for /etc/ld.so.conf.d/*.conf > +add_ld_so_conf_d() { > + if [ -f ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf ]; then > + if ! `grep -q 'include ld.so.conf.d\/\*.conf' /etc/ld.so.conf`; > then > + echo 'include ld.so.conf.d/*.conf' >> > ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf > + fi > + mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf.d > + fi > +} > + > python write_image_manifest () { > from oe.rootfs import image_list_installed_packages > from oe.utils import format_pkg_list > -- > 2.11.0 > > -- > _______________________________________________ > Openembedded-core mailing list > [email protected] > http://lists.openembedded.org/mailman/listinfo/openembedded-core >
-- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
