]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd: sed installed file instead of original
authorSaul Wold <sgw@linux.intel.com>
Wed, 26 Feb 2014 13:49:52 +0000 (15:49 +0200)
committerSaul Wold <sgw@linux.intel.com>
Fri, 28 Feb 2014 09:32:11 +0000 (11:32 +0200)
When we change the ROOT_HOME the sed regex does not match if we are running
the do_install() a second time, so copy the units files first to a pre_sed,
so that the next time, we can copy the the original so that the sed regex
is matched correctly in the original

[YOCTO #5765]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-core/systemd/systemd_208.bb

index 219607f18f06cc11e572d220877c37a84061fe0f..1bcedaa28a0092a110edd0e6f80f73dcca60bbca 100644 (file)
@@ -89,6 +89,11 @@ EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
 do_configure_prepend() {
        export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
        export KMOD="${base_bindir}/kmod"
+       if [ -d ${S}/units.pre_sed ] ; then
+               cp -r ${S}/units.pre_sed ${S}/units
+       else
+               cp -r ${S}/units ${S}/units.pre_sed
+       fi
        sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
 }