修复在docker中构建时会错误地卸载proc的问题

This commit is contained in:
谢炜 2022-09-30 16:13:09 +08:00
parent a5b36356d7
commit 059bfe2d0f
2 changed files with 19 additions and 2 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
debootstrap (1.0.118-ok3) yangtze; urgency=medium
[ 谢炜 ]
* 修复在docker中构建时会错误地卸载proc的问题
-- Xie Wei <xiewei@kylinos.cn> Fri, 30 Sep 2022 16:13:34 +0800
debootstrap (1.0.118-ok2) yangtze; urgency=medium
* update version info

View File

@ -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