meta_package_manager.managers.pacman module¶
- class meta_package_manager.managers.pacman.Pacman[source]¶
Bases:
PackageManagerArch Linux’s native package manager, covering the official repositories.
mpmforces--noconfirmand--color neveron every call so pacman runs unattended and prints uncolored text the regexes can parse. Installed packages come from--queryand upgradable ones from--query --upgrades; searches hit the sync databases via--sync --search.The
Pacaur,ParuandYaysubclasses are AUR helpers that reuse every parser and forced argument here unchanged, overriding only the binary (and, foryay, adding a release-age cooldown).Command equivalences with other managers are listed in Pacman/Rosetta.
Caution
--query --upgradesonly reports updates for packages tracked in a sync database, so foreign packages (installed withpacman -U, as AUR helpers do) stay invisible to the basepacmanbinary. The subclasses escape this because their own binary also queries the AUR RPC. This upstream behavior is not confirmed on a live Arch box: seePacman.outdated().Initialize
cli_errorslist.- 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.
- logo: str | None = 'archlinux'¶
Annotated so a subclass may drop the mark:
DkpPacmanis a pacman fork that Arch’s logo would misattribute.
- 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='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='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='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:
DkpPacmanships for macOS too.
- default_sudo: bool = True¶
Built-in escalation default, used when
sudoisNone.Falseon 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 toTrueso theirbuild_cli(..., sudo=True)operations escalate out of the box, while staying switchable off throughsudo(--no-sudoor config) for rootless setups.
- 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.
- version_regexes: tuple[str, ...] = ('.*Pacman\\s+v(?P<version>\\S+)',)¶
Search version right after the
Pacmanstring.$ 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 --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 --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 inpacman.conf). Foreign packages, those installed withpacman -Uas most AUR helpers do, are invisible to-Quand surface only under-Qm.The
Pacaur,ParuandYaysubclasses inherit this method verbatim, yet still see AUR updates because their own binary’s-Quadditionally queries the AUR RPC for foreign packages. The per-subclass binary override is therefore load-bearing: routing these helpers throughpacmandirectly would silently drop every AUR update from the results.Caution
This follows upstream
-Qusemantics but has not been confirmed on a live Arch box. Before relying on it, verify thatyay --query --upgradesinvoked through mpm actually surfaces a pending AUR update.
- property orphans: Iterator[Package]¶
Fetch packages installed as dependencies that nothing requires anymore.
Same
<name> <version>listing shape asinstalled(), 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 --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
- install(package_id, version=None)[source]¶
Install one package.
$ sudo pacman --noconfirm --color never --sync firefox
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade the package provided as parameter.
$ sudo pacman --noconfirm --color never --sync --refresh --sysupgrade
- 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
- remove(package_id)[source]¶
Removes a package.
$ sudo pacman --noconfirm --color never --remove firefox
- Return type:
- 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:
- sync()[source]¶
Sync package metadata.
$ sudo pacman --noconfirm --color never --sync --refresh
- Return type:
- cleanup_cache()[source]¶
Removes things we don’t need anymore.
$ sudo pacman --noconfirm --color never --sync --clean --clean
- Return type:
- 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-0when everything is fine.$ pacman --noconfirm --color never --database --check
- 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
pythonorpython3.
By default, this property’s value is derived from the manager’s ID (see the
MetaPackageManager.__init__method above).
- class meta_package_manager.managers.pacman.DkpPacman[source]¶
Bases:
PacmandevkitPro’s
pacmanfork, covering the console homebrew toolchains.devkitPro ships its own pacman build under the
dkp-pacmanname so it can sit beside a distribution’s ownpacmanwithout 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
Pacmanunchanged: the fork tracks upstream closely enough that its version banner still comes from the sameprintf(" .--. Pacman v%s - libalpm v%s")call, so the inheritedPacman.version_regexesreads it as-is.Unlike the AUR helpers below this one is not a helper at all but pacman itself, so it keeps the
default_sudoinherited fromPacman.Documentation: devkitPro pacman.
Initialize
cli_errorslist.- 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.
- homepage_url: str | None = 'https://github.com/devkitPro/pacman'¶
Home page of the project, only used in documentation for reference.
- logo: str | None = None¶
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='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='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='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-pacmanfor Linux and for macOS, the latter through thedevkitpro-pacman-installer.pkgof its releases. Its Windows path installs the toolchains through MSYS2’s ownpacmaninstead, 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.xreleases of 2020 predate that alignment and are excluded deliberately.
- class meta_package_manager.managers.pacman.Pacaur[source]¶
Bases:
PacmanAUR helper wrapping
pacman, driven through thepacaurbinary.Inherits every operation, parser and forced argument from
Pacman; only the binary and version probe differ. Routing throughpacauris what lets--query --upgradesreport 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) becausemakepkgrefuses to build as root, and it invokessudo pacmanitself for the privileged steps.mpmtherefore never wraps it insudo.Initialize
cli_errorslist.- 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 years, formally superseded by a successor, or part of a discontinued platform. See the stability policy in
CLAUDE.mdfor the full criteria.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 stability policy: it may be dropped, in part or in full, in any release and without notice, once keeping it working becomes too burdensome.
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
unmaintainedflag, 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 whoseunmaintainedflag is set, and only meaningful on such managers. Enforced bytest_unmaintained.
- name: str = 'Arch Linux pacaur'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/E5ten/pacaur'¶
Home page of the project, only used in documentation for reference.
- logo: str | None = 'archlinux'¶
Annotated so a subclass may drop the mark:
DkpPacmanis a pacman fork that Arch’s logo would misattribute.
- default_sudo: bool = False¶
pacaur aborts its sync-class operations under root and runs
sudo pacmanitself, so the escalation default inherited fromPacmanmust not wrap it.
- internal_sudo: bool = True¶
pacaur calls
sudo pacmanfrom 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
pacaurstring.$ 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
pythonorpython3.
By default, this property’s value is derived from the manager’s ID (see the
MetaPackageManager.__init__method above).
- class meta_package_manager.managers.pacman.Paru[source]¶
Bases:
PacmanAUR helper wrapping
pacman, driven through theparubinary.Inherits every operation, parser and forced argument from
Pacman; only the binary and version probe differ. Its own--query --upgradesreports AUR updates on top of the official repositories. The>=1.9.3floor is the firstparurelease to implement--sysupgrade, the flag the inheritedupgrade_all_clibuilds.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.mpmtherefore never wraps it insudo.Initialize
cli_errorslist.- name: str = 'Arch Linux paru'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/Morganamilo/paru'¶
Home page of the project, only used in documentation for reference.
- logo: str | None = 'archlinux'¶
Annotated so a subclass may drop the mark:
DkpPacmanis a pacman fork that Arch’s logo would misattribute.
- default_sudo: bool = False¶
paru refuses to build AUR packages under root and runs
sudo pacmanitself, so the escalation default inherited fromPacmanmust not wrap it.
- internal_sudo: bool = True¶
paru calls
sudofrom inside its own commands (theSudo/SudoFlagssettings ofparu.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
parustring.$ 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 --infoprints the AUR RPC’sLastModifiedfor an AUR package: the server-set timestamp of the last push, the same clockmpm’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 (
Repositoryis anything butaur) is out of the gate’s scope: Arch’s archive stages releases on its own, so it reads asCOOLDOWN_EXEMPTand 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
- upgrade_all_cli_excluding(package_ids)[source]¶
Full upgrade in one transaction, skipping the named packages.
pacman’s
--ignoretakes a comma-separated list, so the held packages ride the helper’s own--sysupgradetransaction: dependency ordering and the repo-plus-AUR interleaving stay paru’s job.$ paru --noconfirm --color never --sync --refresh --sysupgrade \ --ignore=fig,kiwi
- 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
pythonorpython3.
By default, this property’s value is derived from the manager’s ID (see the
MetaPackageManager.__init__method above).
- class meta_package_manager.managers.pacman.Pikaur[source]¶
Bases:
PacmanAUR helper wrapping
pacman, driven through thepikaurbinary.Inherits every operation, parser and forced argument from
Pacman; the binary, the version probe and the release floor are what differ. Its own--query --upgradesreports AUR updates on top of the official repositories.Like the other helpers, pikaur must run as the regular user:
makepkgrefuses to build as root, and pikaur drivessudo pacmanitself for the privileged steps.mpmtherefore never wraps it insudo.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--noconfirmforced byPacman.pre_argsis what keeps that split unattended.Documentation: pikaur.
Initialize
cli_errorslist.- name: str = 'Arch Linux pikaur'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/actionless/pikaur'¶
Home page of the project, only used in documentation for reference.
- logo: str | None = 'archlinux'¶
Annotated so a subclass may drop the mark:
DkpPacmanis 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 callssudo pacmanitself, so the escalation default inherited fromPacmanmust not wrap it.
- internal_sudo: bool = True¶
pikaur calls
sudo pacmanfrom 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.0would reject every release it has ever made.The floor sits at the start of the
1.xseries because nothing this class relies on is newer than it: the wrapped pacman option set and thePikaur vversion banner both predate it, and the parsers are pacman’s own.
- version_regexes: tuple[str, ...] = ('.*Pikaur\\s+v(?P<version>\\S+)',)¶
Search version right after the
Pikaurstring.Anchoring on
Pikaurrather than the inheritedPacmanpattern is load-bearing: pikaur reports both versions, embedding the second line ofpacman --versionin its own output, so 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 sameprint_version()ofpikaur/print_department.py, the quiet one verbatim.
- 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
pythonorpython3.
By default, this property’s value is derived from the manager’s ID (see the
MetaPackageManager.__init__method above).
- class meta_package_manager.managers.pacman.Trizen[source]¶
Bases:
PacmanAUR helper wrapping
pacman, driven through thetrizenbinary.Inherits every operation, parser and forced argument from
Pacman; the binary, the version probe and the release floor are what differ. Its own--query --upgradesreports AUR updates on top of the official repositories.Like the other helpers, trizen must run as the regular user:
makepkgrefuses to build as root, and trizen callssudo pacmanitself for the privileged steps.mpmtherefore never wraps it insudo.Note
Upstream is slow rather than stopped: commits continue, but
1.68of December 2022 is still the newest release. It stays unflagged here because the stability policy keysunmaintainedon an abandoned upstream, not on a quiet release cadence.Documentation: trizen.
Initialize
cli_errorslist.- name: str = 'Arch Linux trizen'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/trizen/trizen'¶
Home page of the project, only used in documentation for reference.
- logo: str | None = 'archlinux'¶
Annotated so a subclass may drop the mark:
DkpPacmanis a pacman fork that Arch’s logo would misattribute.
- 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
pythonorpython3.
By default, this property’s value is derived from the manager’s ID (see the
MetaPackageManager.__init__method above).
- 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.
- default_sudo: bool = False¶
trizen builds AUR packages through
makepkg, which hard-refuses to run as root, and callssudo pacmanitself, so the escalation default inherited fromPacmanmust not wrap it.
- internal_sudo: bool = True¶
trizen calls
sudo pacmanfrom inside its own commands for the install, upgrade and removal steps.
- class meta_package_manager.managers.pacman.Yay[source]¶
Bases:
PacmanAUR helper wrapping
pacman, driven through theyaybinary.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 --upgradesreports 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 inmakepkg, which refuses to run as root. yay drivessudoitself for the privileged steps (its--sudo,--sudoflagsand--sudoloopoptions), sompmnever wraps it insudo. That also keeps the injectedXDG_CONFIG_HOMEcooldown overlay below visible to yay, where asudowrap would have reset the environment.Note
yay exposes no release-age flag, so mpm enforces the supply-chain
cooldownby overlaying a generatedinit.luathrough a privateXDG_CONFIG_HOME(seeYay.cooldown_env()). This needs yay >= 13.0.0, when the LuaUpgradeSelect/AURPreInstallhooks 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_errorslist.- 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
pythonorpython3.
By default, this property’s value is derived from the manager’s ID (see the
MetaPackageManager.__init__method above).
- 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.
- name: str = 'Arch Linux yay'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/Jguer/yay'¶
Home page of the project, only used in documentation for reference.
- logo: str | None = 'archlinux'¶
Annotated so a subclass may drop the mark:
DkpPacmanis a pacman fork that Arch’s logo would misattribute.
- default_sudo: bool = False¶
yay discourages root runs (
makepkghard-refuses them for AUR builds) and drivessudoitself, so the escalation default inherited fromPacmanmust not wrap it. A wrap would also strip theXDG_CONFIG_HOMEcooldown overlay throughsudo’s environment reset.
- internal_sudo: bool = True¶
yay calls the escalation binary from inside its own commands, configurable through its
--sudo,--sudoflagsand--sudoloopoptions.
- 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_HOMEto point yay at the throwaway config overlay built bycooldown_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 structuralsupports_cooldowncheck (and the--cooldownhelp text) still recognize yay as cooldown-capable.
- version_regexes: tuple[str, ...] = ('yay\\s+v(?P<version>\\S+)',)¶
Search version right after the
yaystring.$ 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_autocmdand theUpgradeSelect/AURPreInstallevents. Kept apart fromrequirement(>=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-timeCOOLDOWN_SUPPORTED_MANAGERShelp text stays I/O-free, and only probes the managerversiononce a cooldown is active, gating oncooldown_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 generatedinit.lua(_YAY_COOLDOWN_INIT_LUA) registers the cooldown Lua hooks. The cutoff travels asMPM_COOLDOWN_EPOCH(Unix seconds ofnow - cooldown), keeping theinit.luaasset static, andMPM_YAY_USER_DIRlets 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).