From f5e0214b87ca2ab105b34c5077454419de7d7207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Sun, 31 Jul 2016 15:18:30 +0200 Subject: [PATCH] fixes: directory creation, removing forceget --- chroot-buildpackages.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chroot-buildpackages.sh b/chroot-buildpackages.sh index 20e88dd7f..f7243104e 100644 --- a/chroot-buildpackages.sh +++ b/chroot-buildpackages.sh @@ -35,6 +35,7 @@ create_chroot() [[ $? -ne 0 || ! -f $target_dir/debootstrap/debootstrap ]] && exit_with_error "Create chroot first stage failed" cp /usr/bin/$QEMU_BINARY $target_dir/usr/bin/ [[ ! -f $target_dir/usr/share/keyrings/debian-archive-keyring.gpg ]] && \ + mkdir -p $target_dir/usr/share/keyrings/ && \ cp /usr/share/keyrings/debian-archive-keyring.gpg $target_dir/usr/share/keyrings/ chroot $target_dir /bin/bash -c "/debootstrap/debootstrap --second-stage" [[ $? -ne 0 || ! -f $target_dir/bin/bash ]] && exit_with_error "Create chroot second stage failed" @@ -80,7 +81,7 @@ update_chroot() deps=() installed=$(dpkg-query -W -f '${db:Status-Abbrev}|${binary:Package}\n' '*' 2>/dev/null | grep '^ii' | awk -F '|' '{print $2}' | cut -d ':' -f 1) for packet in "$@"; do grep -q -x -e "$packet" <<< "$installed" || deps+=("$packet"); done - [[ ${#deps[@]} -gt 0 ]] && apt-get -y --force-yes --no-install-recommends install "${deps[@]}" + [[ ${#deps[@]} -gt 0 ]] && apt-get -y --no-install-recommends install "${deps[@]}" EOF chmod +x $target_dir/root/install-deps.sh } #############################################################################