From 2dd731a8ff9580199746954122b143a5f4dc7361 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Jan 2016 11:52:37 -0500 Subject: cmd/build: Check return value of package_init() Also clean up on error now. --- diff --git a/src/cmd/build.sh b/src/cmd/build.sh index 5151c46..d12edfb 100644 --- a/src/cmd/build.sh +++ b/src/cmd/build.sh @@ -80,7 +80,10 @@ cmd_build_main() [ "x${dev}" != 'x' ] && block_umount "${root}" return 2 fi - package_init "${cmd_build_pkg_dir}" + if ! package_init "${cmd_build_pkg_dir}"; then + [ "x${dev}" != 'x' ] && block_umount "${root}" + return 2 + fi package_set_substvars "${arch}" "${plat}" session_begin "${root}" "${cmd_build_pkg_dir}" cmd_build_fini false -- cgit v0.9.1