Error out when needed packages are missing on the host

Previously, Check_package would only show an error when host packages
are missing on a non-apt system. On apt system, the packages would be
added to _LB_PACKAGES, which causes them to be installed in the chroot,
not in the host (or not at all if Install_package is not called). This
behaviour could break the build.

This applies to either packages that must be present in the host (as
checked with `Check_package host ...`), as well as packages that can be
either in the chroot or host (as checked with `Check_package chroot`)
when LB_BUILD_WITH_CHROOT=false.
This commit is contained in:
Matthijs Kooijman 2017-08-28 15:14:34 +02:00 committed by Raphaël Hertzog
parent 4c229d9449
commit 5ca1ded228
1 changed files with 7 additions and 7 deletions

View File

@ -16,16 +16,16 @@ Check_package ()
Check_installed "${CHROOT}" "${FILE}" "${PACKAGE}"
case "${INSTALL_STATUS}" in
1)
if [ "${INSTALL_STATUS}" -ne 0 ]
then
if [ "${LB_BUILD_WITH_CHROOT}" != "false" ]
then
_LB_PACKAGES="${_LB_PACKAGES} ${PACKAGE}"
;;
2)
else
Echo_error "You need to install %s on your host system." "${PACKAGE}"
exit 1
;;
esac
fi
fi
}
Install_package ()