Browse Source

sdk: Proceed if directories where not mounted while unmounting

Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
Maxim Yu. Osipov 6 years ago
parent
commit
96672c7
1 changed files with 3 additions and 1 deletions
  1. 3 1
      meta/classes/image.bbclass

+ 3 - 1
meta/classes/image.bbclass

@@ -107,8 +107,10 @@ do_populate_sdk() {
     # Purge apt cache to make image slimmer
     sudo rm -rf ${SDKCHROOT_DIR}/rootfs/var/cache/apt/*
 
+    sudo umount ${SDKCHROOT_DIR}/rootfs/dev || true
+    sudo umount ${SDKCHROOT_DIR}/rootfs/proc || true
+
     # Create SDK archive
-    sudo umount ${SDKCHROOT_DIR}/rootfs/dev ${SDKCHROOT_DIR}/rootfs/proc
     sudo tar -C ${SDKCHROOT_DIR} --transform="s|^rootfs|sdk-${DISTRO}-${DISTRO_ARCH}|" \
         -c rootfs | xz -T0 > ${DEPLOY_DIR_IMAGE}/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz