From 6736b550f112f14c17401329a6a2a63ddc53e68b Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Jan 2016 15:50:32 -0500 Subject: cmd/*: Check return value of session_begin() Also clean up on error now. --- (limited to 'src/cmd/build.sh') diff --git a/src/cmd/build.sh b/src/cmd/build.sh index a366a01..1d0ad52 100644 --- a/src/cmd/build.sh +++ b/src/cmd/build.sh @@ -88,7 +88,12 @@ cmd_build_main() fi package_set_substvars "${arch}" "${plat}" - session_begin "${root}" "${cmd_build_pkg_dir}" cmd_build_fini false + if ! session_begin "${root}" "${cmd_build_pkg_dir}" cmd_build_fini false + then + cmd_build_fini + [ "x${dev}" != 'x' ] && block_umount "${root}" + return 2 + fi cmd_build_build_deps="$(package_get_build_deps "${arch}" "${plat}")" if [ "x${cmd_build_build_deps}" != 'x' ]; then -- cgit v0.9.1