Skip to content

Commit

Permalink
Fix system package installation command to ignore missing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Jan 17, 2024
1 parent ee62f9f commit 1979b9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
if [ $INSTALL_PYTHON = 'True' ]; then
eval $(build/bin/sage-print-system-package-command $SYSTEM --yes install $(build/bin/sage-get-system-packages $SYSTEM _python3.9))
fi
eval $(build/bin/sage-print-system-package-command $SYSTEM --yes install $(build/bin/sage-get-system-packages $SYSTEM $(build/bin/sage-package list :standard:)))
eval $(build/bin/sage-print-system-package-command $SYSTEM --yes --ignore-missing install $(build/bin/sage-get-system-packages $SYSTEM $(build/bin/sage-package list :standard:)))
pip3 install jinja2
- name: Bootstrap
Expand Down
5 changes: 5 additions & 0 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ do
--yes)
YES=yes
;;
--ignore-missing)
IGNORE_MISSING=yes
;;
-*)
echo >&2 "$0: unknown option $1"
exit 1
Expand Down Expand Up @@ -139,10 +142,12 @@ case $system:$command in
@(debian*|ubuntu*):*)
[ "$NO_INSTALL_RECOMMENDS" = yes ] && options="$options --no-install-recommends"
[ "$YES" = yes ] && options="$options --yes" env="DEBIAN_FRONTEND=noninteractive "
[ "$IGNORE_MISSING" = yes ] && options="$options --ignore-missing"
[ -n "$system_packages" ] && print_shell_command ${SUDO}${env}apt-get $command $options $system_packages
;;
@(fedora*|redhat*|centos*):install)
[ "$YES" = yes ] && options="$options -y"
[ "$IGNORE_MISSING" = yes ] && options="$options --skip-broken"
[ -n "$system_packages" ] && print_shell_command ${SUDO}yum install $options $system_packages
;;
gentoo*:install)
Expand Down

0 comments on commit 1979b9b

Please sign in to comment.