enum

Fluxion::PackageManager

Inherits Enum < Comparable < Value < Object

Every package manager Fluxion can drive.

Flatpak and Cargo sit alongside the system managers because profiles select them by the same packageManager field, even though neither can perform a system update — see #supports_system_update?.

Constants

Dnf = 0
Pacman = 1
Paru = 2
Yay = 3
Apt = 4
Flatpak = 5
Zypper = 6
Cargo = 7

Class methods

from_config?(value : String | Nil) : self | Nil
Source

Instance methods

action_argv(action : PackageAction) : Tuple(Array(String), Set(Int32))

Argv for a pre-install action such as a metadata refresh, plus the exit codes that count as success. dnf check-update exits 100 when updates are available, which is the answer to the question, not a failure.

Source
apt?

Returns true if this enum value equals Apt

Source
aur?

AUR helpers refuse to run as root and escalate themselves for the pacman steps that need it, so Fluxion must not wrap them in sudo.

Source
cargo?

Returns true if this enum value equals Cargo

Source
command

The executable doctor checks for on PATH.

Source
config_name
Source
dnf?

Returns true if this enum value equals Dnf

Source
flatpak?

Returns true if this enum value equals Flatpak

Source
install_argv(package : String) : Array(String)

Argv that installs one package. Fluxion installs a package per process so a single bad name cannot take the rest of the list down with it.

A leading "sudo" is a marker, not the final command: the shell runner rewrites it into a non-interactive invocation with a trust-resolved target before anything is spawned.

Source
pacman?

Returns true if this enum value equals Pacman

Source
paru?

Returns true if this enum value equals Paru

Source
query_argv(package : String) : Array(String)

Argv that reports whether a package is already installed, without touching the network.

Source
supports_system_update?

system-update needs a manager that owns the whole system's packages. Cargo and Flatpak each own a slice of it, so "upgrade everything" has no meaning for them and the profile is asking for something impossible.

Source
to_s(io : IO) : Nil

Appends a String representation of this enum member to the given io.

See also: to_s.

Source
yay?

Returns true if this enum value equals Yay

Source
zypper?

Returns true if this enum value equals Zypper

Source