|
|
@ -355,6 +355,22 @@ pkgloop_action() { |
|
|
|
$cmd_buildpkg |
|
|
|
} |
|
|
|
|
|
|
|
# Try to umount any directories mounted by Build-Pkg -chroot |
|
|
|
# if we are the last process using them. |
|
|
|
# |
|
|
|
umount_chroot() { |
|
|
|
exec 201> /dev/null |
|
|
|
if [ -z "$( fuser "${build_logs}/*.log" )" ]; then |
|
|
|
umount -d -f $build_rock/{loop,config,download} 2> /dev/null |
|
|
|
umount -d -f -l $build_rock/{loop,config,download} 2> /dev/null |
|
|
|
umount -d -f $build_root/proc 2> /dev/null |
|
|
|
umount -d -f -l $build_root/proc 2> /dev/null |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
# must trap outside the group command |
|
|
|
trap 'umount_chroot' EXIT |
|
|
|
|
|
|
|
{ |
|
|
|
ln -sf build_target_$$.log ${build_logs}/build_target.log |
|
|
|
./scripts/Build-Tools -1 -cfg $config |
|
|
|