From 61934c9d1dbad94acfc9dcefabff7f3b3df94bd9 Mon Sep 17 00:00:00 2001 From: Gabriel Ionescu Date: Mon, 17 Dec 2018 16:52:33 +0100 Subject: DPKG: Move /var/lib/dpkg to /usr/dpkg to make DPKG work with OSTree Change-Id: I7b9fad743da343bc73c0ad11374faa944e5b3627 Signed-off-by: Gabriel Ionescu --- images/enea-nfv-access-host-common.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index d3af42b..7de5dcd 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -48,3 +48,11 @@ python __anonymous () { d.delVarFlag("do_image_otaimg", "depends") d.setVarFlag("do_image_otaimg", "depends", "e2fsprogs-native:do_populate_sysroot") } + +# Before building the OSTree image, move DPKG data to /usr/dpkg, because +# OSTree does not preserve the contents of /var +IMAGE_CMD_ostree_prepend () { + install -d 0644 ${IMAGE_ROOTFS}/usr/dpkg/ + + mv ${IMAGE_ROOTFS}/var/lib/dpkg/* ${IMAGE_ROOTFS}/usr/dpkg/ +} -- cgit v1.2.3-54-g00ecf