[pacman-dev] [PATCH] makechrootpkg: handle errors when copying packages into chroot
juergen at hoetzel.info
juergen at hoetzel.info
Wed Aug 1 16:31:30 UTC 2018
From: Juergen Hoetzel <juergen at archlinux.org>
Prevents consequential build errors.
Signed-off-by: Juergen Hoetzel <juergen at archlinux.org>
---
makechrootpkg.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/makechrootpkg.in b/makechrootpkg.in
index d81be84..419e495 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -145,8 +145,10 @@ install_packages() {
local ret
pkgnames=("${install_pkgs[@]##*/}")
-
- cp -- "${install_pkgs[@]}" "$copydir/root/"
+ if ! cp -- "${install_pkgs[@]}" "$copydir/root/"; then
+ error "Cannot copy packages"
+ return 1
+ fi
arch-nspawn "$copydir" "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
pacman -U --noconfirm -- "${pkgnames[@]/#//root/}"
ret=$?
--
2.18.0
More information about the pacman-dev
mailing list