Skip to content

Commit

Permalink
urpmi auto-selection where appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Aug 31, 2023
1 parent 9108b7e commit 595d1a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/dorothy-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ jobs:
# dnf check-update --assumeyes
# dnf upgrade --assumeyes --refresh --best --allowerasing
# ^ disabled as always fails
urpmi bash curl
# https://man.linuxreviews.org/man8/urpmi.8.html
urpmi --auto bash curl
elif command -v dnf; then
# for fedora
dnf --assumeyes --refresh --best --allowerasing install bash curl
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Mageia:
```bash
urpmi --auto-update --auto
dnf check-update
urpmi bash curl
urpmi --auto bash curl
```

Nix:
Expand Down
2 changes: 1 addition & 1 deletion commands/dorothy
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ function dorothy() (
try_sudo pacman --refresh --sync --needed --noconfirm bash curl git ncurses moreutils procps-ng
elif command_exists urpmi; then
# for mageia, prefer over fedora as mageia contains dnf
try_sudo urpmi bash curl git ncurses moreutils
try_sudo urpmi --auto bash curl git ncurses moreutils
elif command_exists dnf; then
# for fedora
try_sudo dnf --assumeyes --refresh --best --allowerasing install bash curl git ncurses procps moreutils
Expand Down
4 changes: 4 additions & 0 deletions commands/setup-util
Original file line number Diff line number Diff line change
Expand Up @@ -2333,6 +2333,7 @@ function setup_util() (
# installs RPMs
# https://wiki.mageia.org/en/URPMI
# https://wiki.mageia.org/en/URPMI#Basic_commands:_Install.2C_remove.2C_update
# https://man.linuxreviews.org/man8/urpmi.8.html
function do_urpmi {
local args=() packages=()
if test "${#URPMI[@]}" -ne 0; then
Expand All @@ -2349,6 +2350,8 @@ function setup_util() (
return 200 # ECUSTOM 200 Not applicable for this package system
fi

# --auto: Install all required dependencies without asking.

# args
if test "$action" = 'uninstall'; then
args+=(
Expand All @@ -2358,6 +2361,7 @@ function setup_util() (
# install / upgrade
args+=(
'urpmi'
'--auto'
)
fi

Expand Down

0 comments on commit 595d1a9

Please sign in to comment.