summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2019-02-06 15:54:48 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2019-02-07 16:07:00 +0100
commitc6f017d5597460aaad464e3a56959e729f267999 (patch)
tree67768628289b0b21dcebed159551b576f64f8335
parent432eeeec4923f939a25728b13983b3f6b9055cbd (diff)
downloadmeta-el-nfv-access-c6f017d5597460aaad464e3a56959e729f267999.tar.gz
enea-nfv-access-host-common: Fix /var/lib/dpkg move error
A forced build of do_image_ostree task results in error due to /var/lib/dpkg folder being empty after it was moved out in previous builds. | mv: cannot stat '/data/fb/addu/nfv-rocko/poky/build-xeond-sb/tmp/work/xeon_d-enea-linux/enea-nfv-access-edgelink-netconf/1.0-r0/rootfs/var/lib/dpkg/*': No such file or directory | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_image_ostree Change-Id: Ia61278eeabec9062e57cc508348be2efcf7599e1 Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--images/enea-nfv-access-host-common.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc
index 2d19f3c..218cf2b 100644
--- a/images/enea-nfv-access-host-common.inc
+++ b/images/enea-nfv-access-host-common.inc
@@ -51,7 +51,9 @@ python __anonymous () {
51# Before building the OSTree image, move DPKG data to /usr/dpkg, because 51# Before building the OSTree image, move DPKG data to /usr/dpkg, because
52# OSTree does not preserve the contents of /var 52# OSTree does not preserve the contents of /var
53IMAGE_CMD_ostree_prepend () { 53IMAGE_CMD_ostree_prepend () {
54 install -d ${IMAGE_ROOTFS}/usr/dpkg/
55 54
56 mv ${IMAGE_ROOTFS}/var/lib/dpkg/* ${IMAGE_ROOTFS}/usr/dpkg/ 55 install -d ${IMAGE_ROOTFS}/usr/dpkg/
56 if [ "$(ls -A ${IMAGE_ROOTFS}/var/lib/dpkg)" ]; then
57 mv ${IMAGE_ROOTFS}/var/lib/dpkg/* ${IMAGE_ROOTFS}/usr/dpkg/
58 fi
57} 59}