diff options
author | Levente Polyak <anthraxx@archlinux.org> | 2024-02-08 21:29:55 +0100 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2024-02-08 22:08:54 +0100 |
commit | 0469d3c902d7b27dd56400e1fb229f47b011c4dc (patch) | |
tree | aaaf0734053344aeea67752da714aaa130ecabee | |
parent | f6b1b1ba4519995a745051dd9bd170cfc9bccdd2 (diff) | |
download | devtools-0469d3c902d7b27dd56400e1fb229f47b011c4dc.tar.xz |
fix(build): avoid trying to download none existing debug packages
Since last release, offload building now has proper error handling
enabled. This unfortunately lead to a regression for packages, like any
packages, where makepkg claims debug packages are available during
--packagelist while none were actually built. This leads to the scp
command failing when trying to download the none existing packages
which ultimately leads to a termination of the build script.
Fix this by filtering out package files that do not exist before trying
to download them.
Fixes #208
Component: pkgctl build
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
-rw-r--r-- | src/offload-build.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/offload-build.in b/src/offload-build.in index 5238129..0c497b9 100644 --- a/src/offload-build.in +++ b/src/offload-build.in @@ -114,7 +114,9 @@ mapfile -t files < <( if [[ -f /usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf ]]; then makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf" fi && - makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist && + while read -r file; do + [[ -f "${file}" ]] && printf "%s\n" "${file}" ||: + done < <(makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist) && printf "%s\n" "${temp}/PKGBUILD" ') |