Skip to content

Commit

Permalink
lkp-exec/install: handle error of makepkg_install_packages()
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Nov 28, 2024
1 parent e0077dd commit fb1a868
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions lkp-exec/install
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,21 @@ makepkg_install_packages() {
packages="$(get_dependency_packages ${distro} ${script} pkg)"
dev_packages="$(get_dependency_packages ${distro} ${script}-dev pkg)"
packages="$(echo $packages $dev_packages | tr '\n' ' ')"
[ -n "$packages" ] && [ "$packages" != " " ] || return

for pkg in $packages; do
[ "$pkg" = "$script" ] && continue
if ! verify_install $pkg; then
install_packages "$pkg" "$distro"
makepkg_install_packages "$pkg" "$distro"
makepkg_install "$pkg" || echo "Install $pkg failed"
fi

verify_install $pkg && continue

install_packages "$pkg" "$distro"
makepkg_install_packages "$pkg" "$distro" || return
makepkg_install "$pkg" || {
echo "Install $pkg failed"
return 1
}
done

return 0
}

makepkg_install_benchmark() {
Expand Down Expand Up @@ -420,7 +425,7 @@ do
}

install_packages "$script" $distro
makepkg_install_packages "$script" $distro
makepkg_install_packages "$script" $distro || exit 1

benchmark_package=$(get_adaptation_pkg $distro "$script")
if [ -n "$FORCE_MODE" ] || ! verify_install "$benchmark_package"; then
Expand Down

0 comments on commit fb1a868

Please sign in to comment.