summaryrefslogtreecommitdiffstats
path: root/src/cmd/build.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-17 15:50:32 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-17 15:50:32 (EST)
commit6736b550f112f14c17401329a6a2a63ddc53e68b (patch)
tree68e54ba4a7879189faaf3756cdd56c444eeb0b7d /src/cmd/build.sh
parent9add17a7f4a24fe04a7a93782e51ce710d7e371e (diff)
cmd/*: Check return value of session_begin()
Also clean up on error now.
Diffstat (limited to 'src/cmd/build.sh')
-rw-r--r--src/cmd/build.sh7
1 files changed, 6 insertions, 1 deletions
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