netmodule-linux-image: move additional image tasks out of recipe

Declare additional image tasks from now in seperate include file

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
This commit is contained in:
Ramon Moesching 2019-04-24 09:43:14 +02:00
parent 35df445c0a
commit 5f3fbff033
2 changed files with 12 additions and 11 deletions

View File

@ -0,0 +1,11 @@
IMAGE_PREPROCESS_COMMAND_sota += " moveRPMDatabase;"
# Change the location of /var/lib/rpm to /usr/lib/rpm.
# This makes the rpm package index consistent with installed packages.
moveRPMDatabase() {
cd ${WORKDIR}/rootfs
mv var/lib/rpm/* usr/lib/rpm
rm -r var/lib/rpm
echo "L /var/lib/rpm - - - - /usr/lib/rpm" > etc/tmpfiles.d/ostree-rpm.conf
}

View File

@ -1,4 +1,5 @@
inherit core-image
require includes/image-preprocessing.inc
SUMMARY = "NetModule Linux Distro Image"
@ -121,15 +122,4 @@ IMAGE_OVERHEAD_FACTOR = "1.0"
OSTREE_BOOTLOADER = "u-boot"
OSTREE_BRANCHNAME ?= "${MACHINE}"
IMAGE_PREPROCESS_COMMAND_sota += " moveRPMDatabase;"
BUILDNAME = "${EXTERNALSRC_GIT_SRCREV};${DATETIME};${PN}"
# Change the location of /var/lib/rpm to /usr/lib/rpm.
# This makes the rpm package index consistent with installed packages.
moveRPMDatabase() {
cd ${WORKDIR}/rootfs
mv var/lib/rpm/* usr/lib/rpm
rm -r var/lib/rpm
echo "L /var/lib/rpm - - - - /usr/lib/rpm" > etc/tmpfiles.d/ostree-rpm.conf
}