diff --git a/debian/changelog b/debian/changelog index 23404cd..2c3f15e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debootstrap (1.0.118-ok3) yangtze; urgency=medium + + [ 谢炜 ] + * 修复在docker中构建时会错误地卸载proc的问题 + + -- Xie Wei Fri, 30 Sep 2022 16:13:34 +0800 + debootstrap (1.0.118-ok2) yangtze; urgency=medium * update version info diff --git a/functions b/functions index a86cedc..093a781 100644 --- a/functions +++ b/functions @@ -1158,7 +1158,12 @@ setup_proc () { *freebsd*) umount_on_exit /dev umount_on_exit /proc - umount "$TARGET/proc" 2>/dev/null || true + if [ -L "$TARGET/proc" ];then + rm -f $TARGET/proc + mkdir $TARGET/proc + else + umount "$TARGET/proc" 2>/dev/null || true + fi if [ "$HOST_OS" = kfreebsd ]; then in_target mount -t linprocfs proc /proc else @@ -1176,7 +1181,12 @@ setup_proc () { umount_on_exit /dev/shm umount_on_exit /proc umount_on_exit /proc/bus/usb - umount "$TARGET/proc" 2>/dev/null || true + if [ -L "$TARGET/proc" ];then + rm -f $TARGET/proc + mkdir $TARGET/proc + else + umount "$TARGET/proc" 2>/dev/null || true + fi # some container environment are used at second-stage, it already treats /proc and so on if [ -z "$(ls -A "$TARGET/proc")" ]; then