Skip to content
Snippets Groups Projects

root.sh: Provide additional diagnostics when package installation failed

Merged Guido Gunther requested to merge guido.gunther/image-builder:apt-debug into master
All threads resolved!
+ 4
1
@@ -180,7 +180,10 @@ function setup_locale()
function install_pkgs()
{
+1
chroot "${basedir}" apt-get -y update
chroot "${basedir}" apt-get -y install ${packages}
if ! chroot "${basedir}" apt -y install ${packages}; then
echo "Package installation failed, this might help to diagnose the problem:"
chroot "${basedir}" apt -y -o Debug::pkgProblemResolver=yes install -y --simulate ${packages}
fi
}
Loading