From: biao716.wang Date: Wed, 16 Mar 2022 12:04:05 +0000 (+0900) Subject: Fix umount issue on Ubuntu20.04 X-Git-Tag: submit/trunk/20220427.104859^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F27%2F272427%2F1;p=tools%2Fbuild.git Fix umount issue on Ubuntu20.04 When update Ubuntu version to 20.04, After first gbs build, for some kind reason During the second gbs build , it will have umount issue: error: there're mounted directories to build root. Please unmount them manually to avoid being deleted unexpectly: / ==> ~/GBS-ROOT/XXX/local/BUILD-ROOTS/scratch.armv7l.0/proc/sys/fs/binfmt_misc So using umount option -l for lazy umount can fix this issue. Change-Id: I5f4ea680fefcc38cd9dce30dfa458710c086a399 Signed-off-by: biao716.wang --- diff --git a/common_functions b/common_functions index 8512eae..f0084f8 100755 --- a/common_functions +++ b/common_functions @@ -151,7 +151,7 @@ buildroot_umount() { # XXX: use stat -f /dev/pts/ -c %T to check whether it's mounted and not suppress errors? local LOOP_CNT=1 while [ $LOOP_CNT -le 20 ] ; do - umount -n "$BUILD_ROOT/$d" 2>/dev/null + umount -n -l "$BUILD_ROOT/$d" 2>/dev/null if test $? -ne 0; then break fi