meta_package_manager.managers.pacman module¶

class meta_package_manager.managers.pacman.Pacman[source]¶

Bases: PackageManager

Arch Linux’s native package manager, covering the official repositories.

mpm forces --noconfirm and --color never on every call so pacman runs unattended and prints uncolored text the regexes can parse. Installed packages come from --query and upgradable ones from --query --upgrades; searches hit the sync databases via --sync --search.

The AUR helpers Aura, Pacaur, Paru, Pikaur, Trizen and Yay subclass it, reusing its parsers and overriding the binary and the version probe; each class docstring names what else differs. DkpPacman is pacman itself, built for devkitPro’s repositories.

Command equivalences with other managers are listed in Pacman/Rosetta.

Initialize cli_errors list.

operation_notes: ClassVar = {'outdated': 'Only packages tracked in a sync database are reported; foreign packages (AUR builds, `-U` installs) stay invisible to the plain `pacman` binary.'}¶

Per-operation hints rendered in the Notes column of the manager page’s Operations table.

Keyed by the Operations member name, each value is a single short sentence explaining why the manager lacks the operation, or what makes its implementation partial: the pointer a reader needs to judge whether the gap is one they could help close. Each sentence starts with a capital and closes with a period, and starts on a word rather than a code span, so the cell reads standalone beside its row. A blank cell stays silent: a manager documenting nothing documents no gap.

The full rationale never lives here: it belongs in a comment beside the implementing method (or beside this declaration, for an operation with no method to hang it on), so the sentence on the page stays a hint and the code keeps the story. The class docstring follows the same split: it keeps only what a user needs to run the tool day to day, never how mpm wraps it.

Validated by test_operation_notes, which also checks every key matches a real operation: a key outside the enum’s vocabulary would never reach a page.

name: str = 'Arch Linux pacman'¶

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://wiki.archlinux.org/title/pacman'¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

documentation_url: str | None = 'https://man.archlinux.org/man/pacman.8.en'¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

repository_url: str | None = 'https://gitlab.archlinux.org/pacman/pacman'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

wikipedia_url: str | None = 'https://en.wikipedia.org/wiki/Pacman_(package_manager)'¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

keywords: tuple[str, ...] = ('arch',)¶

Well-known names for this manager that its id does not already carry.

Merged into the PyPI keywords of pyproject.toml by update_keywords() of docs/docs_update.py, alongside every manager ID and the globally curated KEYWORDS_EXTRAS. Declare an alias here rather than in that tuple whenever it names this manager: an alias living beside the class it describes cannot outlive it, where a central entry silently rots once the manager is renamed or dropped.

Reserve KEYWORDS_EXTRAS for terms belonging to no manager in particular, like cyclonedx or package manager. Documentation-only: no CLI output reads it.

Each keyword also becomes a content rule of the issue labeller, so its precision bar applies here: see generate_content_rules(). A subclass inherits the terms of its parent without claiming them, since test_manager_keywords_have_one_owner reads what a class declares itself.

platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), Platform(id='almalinux', name='AlmaLinux'), Platform(id='alpine', name='Alpine Linux'), Platform(id='altlinux', name='ALT Linux'), Platform(id='amzn', name='Amazon Linux'), Platform(id='android', name='Android'), Platform(id='arch', name='Arch Linux'), Platform(id='buildroot', name='Buildroot'), Platform(id='cachyos', name='CachyOS'), Platform(id='centos', name='CentOS'), Platform(id='chromeos', name='ChromeOS'), Platform(id='clearlinux', name='Clear Linux OS'), Platform(id='cloudlinux', name='CloudLinux OS'), Platform(id='crux', name='CRUX'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), Platform(id='endeavouros', name='EndeavourOS'), Platform(id='exherbo', name='Exherbo Linux'), Platform(id='fedora', name='Fedora'), Platform(id='freebsd', name='FreeBSD'), Platform(id='generic_linux', name='Generic Linux'), Platform(id='gentoo', name='Gentoo Linux'), Platform(id='guix', name='Guix System'), Platform(id='haiku', name='Haiku'), Platform(id='hurd', name='GNU/Hurd'), Platform(id='ibm_powerkvm', name='IBM PowerKVM'), Platform(id='illumos', name='illumos'), Platform(id='kali', name='Kali Linux'), Platform(id='kvmibm', name='KVM for IBM z Systems'), Platform(id='linuxmint', name='Linux Mint'), Platform(id='mageia', name='Mageia'), Platform(id='mandriva', name='Mandriva Linux'), Platform(id='manjaro', name='Manjaro Linux'), Platform(id='midnightbsd', name='MidnightBSD'), Platform(id='netbsd', name='NetBSD'), Platform(id='nixos', name='NixOS'), Platform(id='nobara', name='Nobara'), Platform(id='nutyx', name='NuTyX'), Platform(id='openbsd', name='OpenBSD'), Platform(id='opensuse', name='openSUSE'), Platform(id='openwrt', name='OpenWrt'), Platform(id='oracle', name='Oracle Linux'), Platform(id='os400', name='IBM i'), Platform(id='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), Platform(id='pikaos', name='PikaOS'), Platform(id='raspbian', name='Raspbian'), Platform(id='rhel', name='RedHat Enterprise Linux'), Platform(id='rocky', name='Rocky Linux'), Platform(id='scientific', name='Scientific Linux'), Platform(id='slackware', name='Slackware'), Platform(id='sles', name='SUSE Linux Enterprise Server'), Platform(id='slitaz', name='SliTaz GNU/Linux'), Platform(id='solaris', name='Solaris'), Platform(id='solus', name='Solus'), Platform(id='sourcemage', name='Source Mage GNU/Linux'), Platform(id='sunos', name='SunOS'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='wsl1', name='Windows Subsystem for Linux v1'), Platform(id='wsl2', name='Windows Subsystem for Linux v2'), Platform(id='xenserver', name='XenServer')})¶

Annotated with the base class’s own union so a subclass may widen it: DkpPacman ships for macOS too.

default_sudo: bool = True¶

Built-in escalation default, used when sudo is None.

False on the base: most managers install into user-writable trees and never need root. The system package managers whose privileged operations require root (apt, dnf, pacman, zypper, …) set this to True so their build_cli(..., sudo=True) operations escalate out of the box, while staying switchable off through sudo (--no-sudo or config) for rootless setups.

privileged_operations: ClassVar[frozenset[str]] = frozenset({'cleanup', 'install', 'remove', 'sync', 'upgrade', 'upgrade_all'})¶

Operations with at least one command this manager marks privileged.

Keyed by the Operations member name, like operation_notes. An operation belongs here when a method implementing it passes sudo=True to run_cli() or build_cli(), with the method-to-operation map of METHOD_OPERATIONS. Those commands are the only ones the escalation policy (sudo, else default_sudo) wraps in the escalator. A definition derives the set from the operations it marks sudo = true.

prime_sudo() reads it to prompt only for the managers that escalate a command of the current run. With [mpm.overrides.gem] sudo = true, mpm sync asks for no password: the gem sources --update command of sync carries no marker. test_privileged_operations holds the set to the markers in the method bodies.

requirement: str | None = '>=5.0.0'¶

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

pre_args: tuple[str, ...] = ('--noconfirm', '--color', 'never')¶

Annotated with a variadic tuple so a subclass may drop an argument: Aura rejects --color outright and forces --noconfirm alone.

version_regexes: tuple[str, ...] = ('.*Pacman\\s+v(?P<version>\\S+)',)¶

Search version right after the Pacman string.

$ pacman --version

 .--.                  Pacman v6.0.1 - libalpm v13.0.1
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2021 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                    This program may be freely redistributed under
                    the terms of the GNU General Public License.
property installed: Iterator[Package]¶

Fetch installed packages.

$ pacman --noconfirm --color never --query
a52dec 0.7.4-11
aalib 1.4rc5-14
abseil-cpp 20211102.0-2
accountsservice 22.08.8-2
acl 2.3.1-2
acme.sh 3.0.2-1
acpi 1.7-3
acpid 2.0.33-1
property outdated: Iterator[Package]¶

Fetch outdated packages.

$ pacman --noconfirm --color never --query --upgrades
linux 4.19.1.arch1-1 -> 4.19.2.arch1-1
linux-headers 4.19.1.arch1-1 -> 4.19.2.arch1-1

Note

pacman --query --upgrades (-Qu) only reports updates for packages tracked in a sync database (official repos, plus any local repo configured in pacman.conf). Foreign packages, those installed with pacman -U as most AUR helpers do, are invisible to -Qu and surface only under -Qm.

The AUR helper subclasses inherit this method verbatim, yet still see AUR updates because their own binary’s -Qu additionally queries the AUR RPC for foreign packages. Each therefore overrides the binary: routing these helpers through pacman directly would silently drop every AUR update from the results.

Caution

Confirmed on a live Arch box against yay 13.0.1: with an AUR package deliberately downgraded, yay --query --upgrades reported it alongside the repository upgrades in one listing, so the inherited parser sees both. Aura is the exception and overrides this, its -Qu reporting the repositories alone.

property orphans: Iterator[Package]¶

Fetch packages installed as dependencies that nothing requires anymore.

Same <name> <version> listing shape as installed(), narrowed by --deps --unrequired (-Qtd) to the orphan set.

$ pacman --noconfirm --color never --query --deps --unrequired
gtest 1.14.0-1
libwlroots 0.16.2-2
search(query, extended, exact)[source]¶

Fetch matching packages.

Caution

Search does not supports extended matching.

$ pacman --noconfirm --color never --sync --search fire
extra/dump_syms 0.0.7-1
    Symbol dumper for Firefox
extra/firefox 99.0-1
    Standalone web browser from mozilla.org
extra/firefox-i18n-ach 99.0-1
    Acholi language pack for Firefox
extra/firefox-i18n-af 99.0-1
    Afrikaans language pack for Firefox
extra/firefox-i18n-an 99.0-1
    Aragonese language pack for Firefox
extra/firefox-i18n-ar 99.0-1
    Arabic language pack for Firefox
extra/firefox-i18n-ast 99.0-1
    Asturian language pack for Firefox
Return type:

Iterator[Package]

install(package_id, version=None)[source]¶

Install one package.

$ sudo pacman --noconfirm --color never --sync firefox
Return type:

str

mark_explicit(package_id)[source]¶

Mark an installed package as explicitly installed.

libalpm copies the old install reason when it reinstalls a package, so --sync alone leaves a dependency marked as one: add.c. Passing --asexplicit to the install instead is not an option: that flag applies to every package of the transaction, so it also marks the dependencies the install pulls in.

--database takes an exact installed package name only, and exits 1 on a group or a provides name.

The AUR helpers pass --database to pacman and escalate it themselves.

$ sudo pacman --noconfirm --color never --database --asexplicit firefox
Return type:

str

upgrade_all_cli()[source]¶

Generates the CLI to upgrade the package provided as parameter.

$ sudo pacman --noconfirm --color never --sync --refresh --sysupgrade
Return type:

tuple[str, ...]

upgrade_one_cli(package_id, version=None)[source]¶

Generates the CLI to upgrade the package provided as parameter.

$ sudo pacman --noconfirm --color never --sync firefox
Return type:

tuple[str, ...]

remove(package_id)[source]¶

Removes a package.

$ sudo pacman --noconfirm --color never --remove firefox
Return type:

str

remove_orphan(package_id)[source]¶

Remove a package together with its now-orphaned dependencies.

--recursive (-s) additionally removes the dependencies the package pulled in that no other installed package needs.

$ sudo pacman --noconfirm --color never --remove --recursive firefox
Return type:

str

sync()[source]¶

Sync package metadata.

$ sudo pacman --noconfirm --color never --sync --refresh
Return type:

None

cleanup_cache()[source]¶

Removes things we don’t need anymore.

$ sudo pacman --noconfirm --color never --sync --clean --clean
Return type:

None

doctor_cli()[source]¶

Generates the CLI running the native self-diagnosis.

--database --check (-Dk) verifies the consistency of the local package database, silent and exit-0 when everything is fine.

$ pacman --noconfirm --color never --database --check
Return type:

tuple[str, ...]

cli_names: tuple[str, ...] = ('pacman',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

id: str = 'pacman'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

class meta_package_manager.managers.pacman.Aura[source]¶

Bases: Pacman

AUR helper wrapping pacman, driven through the aura binary.

Aura reuses every parser and query of Pacman unchanged, but not its forced arguments and not its outdated(): those are the two places where a v4 aura differs from the helpers around it.

Note

Every v4 subcommand answers to a long name, a pacman letter and a long pacman flag alike, so aura --query --upgrades and aura -Qu are one command. That is what lets this class inherit Pacman’s operations verbatim rather than restating them against a clap-only vocabulary.

Important

Repository upgrades and AUR upgrades are two commands here, where yay and paru fold both into one --query --upgrades. Aura’s -Qu reads the local ALPM database against the sync databases, so it reports the official repositories alone and an out-of-date AUR package stays invisible to it. The AUR half lives behind --aursync --sysupgrade --dryrun, which reports without acting. outdated() runs both and concatenates them, so mpm reports what an aura -Syu followed by an aura -Au would actually upgrade.

Initialize cli_errors list.

name: str = 'Arch Linux aura'¶

Return package manager’s common name.

Default value is based on class name.

documentation_url: str | None = 'https://fosskers.github.io/aura/'¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

repository_url: str | None = 'https://github.com/fosskers/aura'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False¶

Aura refuses to build as root, makepkg hard-refusing it, and elevates itself for the privileged half instead.

Its [general] elevator setting names the program, and with none set it looks for sudo, doas and run0 in that order. So the escalation default inherited from Pacman must not wrap it, the same treatment yay gets.

internal_sudo: bool = True¶

Aura calls the elevation binary from inside its own commands.

requirement: str | None = '>=4.0.0'¶

The major that introduced the subcommand interface every operation here drives; the parsers were checked against 4.2.0.

Aura v3 was a different implementation in a different language, and its releases are not on this line at all.

pre_args: tuple[str, ...] = ('--noconfirm',)¶

Pacman’s --color never is dropped: aura rejects the flag outright with error: unexpected argument '--color' found, which would fail every call rather than merely leaving the output colored.

Nothing replaces it, and nothing needs to: aura writes no SGR escapes when its output is not a terminal, verified on every listing parsed here.

version_regexes: tuple[str, ...] = ('aura\\s+(?P<version>\\S+)',)¶

Search the version right after the aura string.

Pacman’s own pattern looks for Pacman v, which aura never prints, so the probe would leave the manager permanently unavailable without this.

$ aura --version
aura 4.2.0
property outdated: Iterator[Package]¶

Fetch outdated packages, from the repositories and the AUR alike.

The two halves are separate commands and cannot be folded: see the class docstring.

$ aura --noconfirm --query --upgrades
kmscon-terminfo 10.0.2-2 -> 10.0.3-1
python-platformdirs 4.11.5-1 -> 4.11.7-1
$ aura --noconfirm --aursync --sysupgrade --dryrun
 yay-bin :: 12.6.0-1 -> 13.0.1-1
cli_names: tuple[str, ...] = ('aura',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

homepage_url: str | None = None¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

id: str = 'aura'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

wikipedia_url: str | None = None¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

class meta_package_manager.managers.pacman.DkpPacman[source]¶

Bases: Pacman

devkitPro’s pacman fork, covering the console homebrew toolchains.

devkitPro ships its own pacman build under the dkp-pacman name so it can sit beside a distribution’s own pacman without colliding, pointed at the devkitPro repositories holding the devkitARM, devkitA64 and devkitPPC toolchains and the libraries built against them.

Every operation, parser and forced argument is inherited from Pacman unchanged: the fork tracks upstream closely enough that its version banner still comes from the same printf(" .--.    Pacman v%s - libalpm v%s") call, so the inherited Pacman.version_regexes reads it as-is.

The AUR helpers below wrap pacman; this one is pacman itself, so it keeps the default_sudo inherited from Pacman.

Initialize cli_errors list.

id: str = 'dkp-pacman'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

name: str = 'devkitPro pacman'¶

Return package manager’s common name.

Default value is based on class name.

documentation_url: str | None = 'https://devkitpro.org/wiki/Getting_Started'¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

repository_url: str | None = 'https://github.com/devkitPro/pacman'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

No mark of its own, and Arch’s would misattribute a devkitPro tool: the manager page keeps the default package glyph instead.

platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='almalinux', name='AlmaLinux'), Platform(id='alpine', name='Alpine Linux'), Platform(id='altlinux', name='ALT Linux'), Platform(id='amzn', name='Amazon Linux'), Platform(id='android', name='Android'), Platform(id='arch', name='Arch Linux'), Platform(id='buildroot', name='Buildroot'), Platform(id='cachyos', name='CachyOS'), Platform(id='centos', name='CentOS'), Platform(id='chromeos', name='ChromeOS'), Platform(id='clearlinux', name='Clear Linux OS'), Platform(id='cloudlinux', name='CloudLinux OS'), Platform(id='crux', name='CRUX'), Platform(id='debian', name='Debian'), Platform(id='endeavouros', name='EndeavourOS'), Platform(id='exherbo', name='Exherbo Linux'), Platform(id='fedora', name='Fedora'), Platform(id='generic_linux', name='Generic Linux'), Platform(id='gentoo', name='Gentoo Linux'), Platform(id='guix', name='Guix System'), Platform(id='ibm_powerkvm', name='IBM PowerKVM'), Platform(id='kali', name='Kali Linux'), Platform(id='kvmibm', name='KVM for IBM z Systems'), Platform(id='linuxmint', name='Linux Mint'), Platform(id='macos', name='macOS'), Platform(id='mageia', name='Mageia'), Platform(id='mandriva', name='Mandriva Linux'), Platform(id='manjaro', name='Manjaro Linux'), Platform(id='nixos', name='NixOS'), Platform(id='nobara', name='Nobara'), Platform(id='nutyx', name='NuTyX'), Platform(id='opensuse', name='openSUSE'), Platform(id='openwrt', name='OpenWrt'), Platform(id='oracle', name='Oracle Linux'), Platform(id='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), Platform(id='pikaos', name='PikaOS'), Platform(id='raspbian', name='Raspbian'), Platform(id='rhel', name='RedHat Enterprise Linux'), Platform(id='rocky', name='Rocky Linux'), Platform(id='scientific', name='Scientific Linux'), Platform(id='slackware', name='Slackware'), Platform(id='sles', name='SUSE Linux Enterprise Server'), Platform(id='slitaz', name='SliTaz GNU/Linux'), Platform(id='solus', name='Solus'), Platform(id='sourcemage', name='Source Mage GNU/Linux'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='wsl1', name='Windows Subsystem for Linux v1'), Platform(id='wsl2', name='Windows Subsystem for Linux v2'), Platform(id='xenserver', name='XenServer')})¶

devkitPro publishes dkp-pacman for Linux and for macOS, the latter through the devkitpro-pacman-installer.pkg of its releases. Its Windows path installs the toolchains through MSYS2’s own pacman instead, which is a different binary this manager does not claim.

requirement: str | None = '>=6.0.0'¶

The series aligned with upstream pacman 6, which every parser inherited here was written against. devkitPro’s own v1.0.x releases of 2020 predate that alignment and are excluded deliberately.

cli_names: tuple[str, ...] = ('dkp-pacman',)¶

The binary is deliberately prefixed upstream so it never shadows a distribution’s own pacman; the class name would otherwise resolve to dkppacman.

homepage_url: str | None = None¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

wikipedia_url: str | None = None¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

class meta_package_manager.managers.pacman.Pacaur[source]¶

Bases: Pacman

AUR helper wrapping pacman, driven through the pacaur binary.

Inherits every operation, parser and forced argument from Pacman; only the binary and version probe differ. Routing through pacaur is what lets --query --upgrades report AUR updates on top of the official repositories.

Unlike pacman, the helper must run as the regular user: it aborts under root (you cannot perform this operation as root) because makepkg refuses to build as root, and it invokes sudo pacman itself for the privileged steps. mpm therefore never wraps it in sudo.

Initialize cli_errors list.

unmaintained: bool = True¶

A manager whose upstream project is no longer maintained.

Covers projects that are officially retired and those we infer are abandoned: archived on their forge, left without a release or commit for about three years, formally superseded by a successor, or part of a discontinued platform. A superseded tool that its upstream keeps shipping is not unmaintained: yum stays a compatibility alias fronting dnf. An upstream that only slows down carries a maintenance_note instead.

An unmaintained manager is hidden from package selection by default (you can still use it by explicitly calling for it on the command line), and is exempt from the project’s stability policy: it may be dropped, in part or in full, in any release and without notice, once keeping it working becomes too burdensome.

The flag is a different axis from being unsupported: an unmaintained manager is still wrapped and usable, where the tools of Unsupported managers were never wrapped at all.

Unmaintained managers are kept out of the functional and integration test matrices, so an unreliable or flaky one never blocks a release and we save CI resources. The commitment is to keep the wrapper for as long as that stays cheap: the cheap static invariants (ID format, attribute ordering, …) still apply for as long as the manager’s code lives in the source tree, to keep that code valid.

Every unmaintained manager must document itself through unmaintained_message.

unmaintained_message: str | None = 'The [original pacaur repository is archived](https://github.com/rmarquis/pacaur) (last commit 2018) and the [E5ten fork](https://github.com/E5ten/pacaur) has had no commits since 2021; migrate to `paru` or `yay`.'¶

Evidence and rationale for the unmaintained flag, as a MyST markdown block.

Rendered into the documentation (the manager’s page, and a ⚠️ marker in the manager tables). May embed markdown links to the archival notice, the successor project, or the discontinuation announcement. Required for every manager whose unmaintained flag is set, and only meaningful on such managers. Enforced by test_unmaintained.

name: str = 'Arch Linux pacaur'¶

Return package manager’s common name.

Default value is based on class name.

repository_url: str | None = 'https://github.com/E5ten/pacaur'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False¶

pacaur aborts its sync-class operations under root and runs sudo pacman itself, so the escalation default inherited from Pacman must not wrap it.

internal_sudo: bool = True¶

pacaur calls sudo pacman from inside its own commands for the install, upgrade and removal steps.

requirement: str | None = '>=4.0.0'¶

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

version_regexes: tuple[str, ...] = ('pacaur\\s+(?P<version>\\S+)',)¶

Search version right after the pacaur string.

$ pacaur --version
pacaur 4.8.6
cli_names: tuple[str, ...] = ('pacaur',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

documentation_url: str | None = None¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

homepage_url: str | None = None¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

id: str = 'pacaur'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

wikipedia_url: str | None = None¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

class meta_package_manager.managers.pacman.Paru[source]¶

Bases: Pacman

AUR helper wrapping pacman, driven through the paru binary.

Inherits every operation, parser and forced argument from Pacman; the binary, the version probe and the per-package cooldown probe below are what differ. Its own --query --upgrades reports AUR updates on top of the official repositories. The >=1.9.3 floor is the first paru release to implement --sysupgrade, the flag the inherited upgrade_all_cli builds.

Unlike pacman, the helper must run as the regular user: any transaction building AUR packages aborts under root (can’t install AUR package as root`), and paru invokes``sudo pacman` itself for the privileged steps. mpm therefore never wraps it in sudo.

Initialize cli_errors list.

name: str = 'Arch Linux paru'¶

Return package manager’s common name.

Default value is based on class name.

repository_url: str | None = 'https://github.com/Morganamilo/paru'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False¶

paru refuses to build AUR packages under root and runs sudo pacman itself, so the escalation default inherited from Pacman must not wrap it.

internal_sudo: bool = True¶

paru calls sudo from inside its own commands (the Sudo/SudoFlags settings of paru.conf) for the install, upgrade and removal steps.

requirement: str | None = '>=1.9.3'¶

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

version_regexes: tuple[str, ...] = ('paru\\s+v(?P<version>\\S+)',)¶

Search version right after the paru string.

$ paru --version
paru v1.10.0 - libalpm v13.0.1
release_date(package_id)[source]¶

Publication timestamp of the latest release of an AUR package.

paru --sync --info prints the AUR RPC’s LastModified for an AUR package: the server-set timestamp of the last push, the same clock mpm’s yay overlay gates on. Git commit dates are client-set and forgeable, and are never consulted.

A package answering from an official repository instead (Repository is anything but aur) is out of the gate’s scope: Arch’s archive stages releases on its own, so it reads as COOLDOWN_EXEMPT and always passes.

$ paru --noconfirm --color never --sync --info paru
Repository      : aur
Name            : paru
Version         : 2.1.0-1
Description     : Feature packed AUR helper
URL             : https://github.com/morganamilo/paru
Licenses        : GPL-3.0-or-later
Maintainer      : Morganamilo
Votes           : 1289
Popularity      : 21.161366
First Submitted : Wed, 21 Oct 2020 20:07:31
Last Modified   : Sat, 12 Jul 2025 14:52:15
Out Of Date     : No
Return type:

datetime | None

upgrade_all_cli_excluding(package_ids)[source]¶

Full upgrade in one transaction, skipping the named packages.

pacman’s --ignore takes a comma-separated list, so the held packages ride the helper’s own --sysupgrade transaction: dependency ordering and the repo-plus-AUR interleaving stay paru’s job.

$ paru --noconfirm --color never --sync --refresh --sysupgrade \
    --ignore=fig,kiwi
Return type:

tuple[str, ...]

cli_names: tuple[str, ...] = ('paru',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

documentation_url: str | None = None¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

homepage_url: str | None = None¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

id: str = 'paru'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

wikipedia_url: str | None = None¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

class meta_package_manager.managers.pacman.Pikaur[source]¶

Bases: Pacman

AUR helper wrapping pacman, driven through the pikaur binary.

Inherits every operation, parser and forced argument from Pacman; the binary, the version probe and the release floor are what differ. Its own --query --upgrades reports AUR updates on top of the official repositories.

Like the other helpers, pikaur must run as the regular user: makepkg refuses to build as root, and pikaur drives sudo pacman itself for the privileged steps. mpm therefore never wraps it in sudo.

Note

pikaur wraps pacman’s options faithfully except –sync –refresh –sysupgrade``(`-Syu`), which it splits into a refresh pass and an upgrade pass so a user can amend the package selection in between. The inherited Pacman.upgrade_all_cli() still builds the combined form, and the --noconfirm forced by Pacman.pre_args is what keeps that split unattended.

Initialize cli_errors list.

name: str = 'Arch Linux pikaur'¶

Return package manager’s common name.

Default value is based on class name.

repository_url: str | None = 'https://github.com/actionless/pikaur'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False¶

pikaur builds AUR packages through makepkg, which hard-refuses to run as root, and calls sudo pacman itself, so the escalation default inherited from Pacman must not wrap it.

internal_sudo: bool = True¶

pikaur calls sudo pacman from inside its own commands for the install, upgrade and removal steps.

requirement: str | None = '>=1.0.0'¶

pikaur versions independently of pacman, so the inherited >=5.0.0 would reject every release it has ever made.

The floor sits at the start of the 1.x series because nothing this class relies on is newer than it: the wrapped pacman option set and the Pikaur v version banner both predate it, and the parsers are pacman’s own.

cli_names: tuple[str, ...] = ('pikaur',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

documentation_url: str | None = None¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

homepage_url: str | None = None¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

id: str = 'pikaur'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

version_regexes: tuple[str, ...] = ('.*Pikaur\\s+v(?P<version>\\S+)',)¶

Search version right after the Pikaur string.

The pattern anchors on Pikaur rather than inheriting Pacman’s because pikaur reports both versions, embedding the second line of pacman --version in its own output: the inherited regex would silently report the version of pacman instead.

$ pikaur --version
Pikaur v1.33.3
Pacman v6.0.2 - libalpm v13.0.2 - pyalpm v0.10.6

The real banner side-joins those lines with an ASCII-art mascot, which is why the block above is an illustration rather than a harvested fixture: the .* prefix is what absorbs the art. Both forms are emitted by the same print_version() of pikaur/print_department.py, the quiet one verbatim.

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

wikipedia_url: str | None = None¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

class meta_package_manager.managers.pacman.Trizen[source]¶

Bases: Pacman

AUR helper wrapping pacman, driven through the trizen binary.

Inherits every operation, parser and forced argument from Pacman; the binary, the version probe and the release floor are what differ. Its own --query --upgrades reports AUR updates on top of the official repositories.

Like the other helpers, trizen must run as the regular user: makepkg refuses to build as root, and trizen calls sudo pacman itself for the privileged steps. mpm therefore never wraps it in sudo.

Note

Upstream is slow rather than stopped: commits continue, but 1.68 of December 2022 is still the newest release. It stays unflagged here because the stability policy keys unmaintained on an abandoned upstream, not on a quiet release cadence.

Initialize cli_errors list.

cli_names: tuple[str, ...] = ('trizen',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

homepage_url: str | None = None¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

id: str = 'trizen'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

wikipedia_url: str | None = None¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

name: str = 'Arch Linux trizen'¶

Return package manager’s common name.

Default value is based on class name.

documentation_url: str | None = 'https://github.com/trizen/trizen/blob/master/TRIZEN.md'¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

repository_url: str | None = 'https://github.com/trizen/trizen'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False¶

trizen builds AUR packages through makepkg, which hard-refuses to run as root, and calls sudo pacman itself, so the escalation default inherited from Pacman must not wrap it.

internal_sudo: bool = True¶

trizen calls sudo pacman from inside its own commands for the install, upgrade and removal steps.

requirement: str | None = '>=1.0.0'¶

trizen versions independently of pacman, so the inherited >=5.0.0 would reject every release it has ever made. Nothing this class relies on is newer than the 1.x series: the parsers are pacman’s own.

version_regexes: tuple[str, ...] = ('trizen\\s+(?P<version>\\S+)',)¶

Search version right after the trizen string.

$ trizen --version
trizen 1.68
class meta_package_manager.managers.pacman.Yay[source]¶

Bases: Pacman

AUR helper wrapping pacman, driven through the yay binary.

Inherits every operation, parser and forced argument from Pacman; the binary, version probe and the release-age cooldown below are what differ. Its own --query --upgrades reports AUR updates on top of the official repositories.

Unlike pacman, the helper must run as the regular user: yay warns under root (Avoid running yay as root/sudo.) and any AUR build then dies in makepkg, which refuses to run as root. yay drives sudo itself for the privileged steps (its --sudo, --sudoflags and --sudoloop options), so mpm never wraps it in sudo. That also keeps the injected XDG_CONFIG_HOME cooldown overlay below visible to yay, where a sudo wrap would have reset the environment.

Note

yay exposes no release-age flag, so mpm enforces the supply-chain cooldown by overlaying a generated init.lua through a private XDG_CONFIG_HOME (see Yay.cooldown_env()). This needs yay >= 13.0.0, when the Lua UpgradeSelect/AURPreInstall hooks landed; an older yay stays a usable manager but cannot honor a cooldown. The upstream request for a less invasive injection point is Jguer/yay#2883.

Initialize cli_errors list.

cli_names: tuple[str, ...] = ('yay',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

homepage_url: str | None = None¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

id: str = 'yay'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

wikipedia_url: str | None = None¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

name: str = 'Arch Linux yay'¶

Return package manager’s common name.

Default value is based on class name.

documentation_url: str | None = 'https://jguer.github.io/yay/'¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

repository_url: str | None = 'https://github.com/Jguer/yay'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False¶

yay discourages root runs (makepkg hard-refuses them for AUR builds) and drives sudo itself, so the escalation default inherited from Pacman must not wrap it. A wrap would also strip the XDG_CONFIG_HOME cooldown overlay through sudo’s environment reset.

internal_sudo: bool = True¶

yay calls the escalation binary from inside its own commands, configurable through its --sudo, --sudoflags and --sudoloop options.

requirement: str | None = '>=11.0.0'¶

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

cooldown_env_var: ClassVar[str | None] = 'XDG_CONFIG_HOME'¶

yay reads no release-age option of its own, so mpm repurposes XDG_CONFIG_HOME to point yay at the throwaway config overlay built by cooldown_env().

Unlike the single-value variables of pip/uv/npm, the value is a directory; the cutoff itself rides alongside it in MPM_COOLDOWN_EPOCH. Set so the structural supports_cooldown check (and the --cooldown help text) still recognize yay as cooldown-capable.

version_regexes: tuple[str, ...] = ('yay\\s+v(?P<version>\\S+)',)¶

Search version right after the yay string.

$ yay --version
yay v11.1.2 - libalpm v13.0.1
cooldown_requirement = '>=13.0.0'¶

Minimum yay version whose Lua hooks the cooldown overlay relies on.

v13.0.0 introduced yay.create_autocmd and the UpgradeSelect/AURPreInstall events. Kept apart from requirement (>=11.0.0) so a v11/v12 yay stays fully usable for everything except the cooldown.

property supports_cooldown: bool¶

Whether this yay can natively enforce a release-age cooldown.

Reports the structural capability while idle (cooldown is None) so the import-time COOLDOWN_SUPPORTED_MANAGERS help text stays I/O-free, and only probes the manager version once a cooldown is active, gating on cooldown_requirement. A yay older than that (or undetectable) reports no support, so the fail-closed default skips install/upgrade rather than running them unguarded.

cooldown_env()[source]¶

Deliver the release-age cooldown through a private XDG_CONFIG_HOME.

yay has no release-age option, so rather than injecting a single value mpm points yay at _cooldown_overlay_dir: a throwaway config tree whose generated init.lua (_YAY_COOLDOWN_INIT_LUA) registers the cooldown Lua hooks. The cutoff travels as MPM_COOLDOWN_EPOCH (Unix seconds of now - cooldown), keeping the init.lua asset static, and MPM_YAY_USER_DIR lets it chain the user’s real config so the redirect stays lossless.

Returns an empty mapping when no cooldown is set or the installed yay predates the Lua hooks (see supports_cooldown).

Return type:

Mapping[str, str | None]