[OE-core] [PATCH 1/1] systemd: systemd: make symlinks for gudev instead of moving around
Andreas Müller
schnitzeltony at googlemail.com
Wed Oct 8 15:52:00 UTC 2014
alternate solution to Martins's approach in [1]
[1] http://lists.openembedded.org/pipermail/openembedded-core/2014-October/097713.html
Signed-off-by: Andreas Müller <schnitzeltony at googlemail.com>
---
meta/recipes-core/systemd/systemd_216.bb | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index ebf9395..c655f9a 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -129,8 +129,15 @@ do_install() {
sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
fi
- # Move libgudev back to ${rootlibdir} to keep backward compatibility
- [ ${rootlibdir} != ${libdir} ] && mv -t ${D}${rootlibdir} ${D}${libdir}/libgudev*
+ # Make symlinks for libgudev in ${rootlibdir} to keep backward compatibility
+ if [ ${rootlibdir} != ${libdir} ]; then
+ for file in `find ${D}${libdir} -name 'libgudev*'`; do
+ filebase=`basename $file`
+ linkloc="${D}${rootlibdir}/$filebase"
+ relpath=`python -c "import os.path; print os.path.relpath('$file', '$linkloc')"`
+ ln -s $relpath $linkloc
+ done
+ fi
# Delete journal README, as log can be symlinked inside volatile.
rm -f ${D}/${localstatedir}/log/README
@@ -171,10 +178,10 @@ python populate_packages_prepend (){
systemdlibdir = d.getVar("rootlibdir", True)
do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
}
-PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
+PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
- ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh"
+ ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
SYSTEMD_PACKAGES = "${PN}-binfmt"
SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
@@ -188,6 +195,8 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
FILES_${PN}-initramfs = "/init"
RDEPENDS_${PN}-initramfs = "${PN}"
+FILES_libgudev = "${libdir}/libgudev*${SOLIBS} ${rootlibdir}/libgudev*${SOLIBS}"
+
# The test cases need perl and bash to run correctly.
RDEPENDS_${PN}-ptest += "perl bash"
FILES_${PN}-ptest += "${libdir}/udev/rules.d"
--
1.8.3.1
More information about the Openembedded-core
mailing list