meta_package_manager.managers.pacstall module¶
- class meta_package_manager.managers.pacstall.Pacstall[source]¶
Bases:
PackageManagerAUR-inspired, source-based package manager for Ubuntu and other Linux distributions.
Pacstall builds packages from “pacscripts” and installs the results as
.debarchives throughdpkg.mpmforcesNO_COLORandDISABLE_PROMPTSso output is uncolored and every call stays non-interactive.pacstall self-escalates: every privileged subcommand re-execs the script through
sudo pacstall(itselevate()function), and its documented invocation is unprefixed (pacstall -I foo).mpmtherefore never wraps it and marks itinternal_sudoinstead: a warmsudocredential cache is kept alive for its mid-run re-exec, and the hidden-prompt watchdog covers the cold-cache case.Note
Listing installed packages is a two-step probe: piped
--listprints bare names with no versions, sompmfollows each with a--cache-info <pkg> versioncall to recover its version.Note
--searchmatches names only and reports no versions. There is no per-package upgrade verb either, so upgrading one package reinstalls it through--install.Initialize
cli_errorslist.- homepage_url: str | None = 'https://pacstall.dev'¶
Home page of the project, only used in documentation for reference.
- 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='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')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a
frozensetofPlatforminstances at instantiation.
- internal_sudo: bool = True¶
Marks a manager whose CLI invokes
sudoitself mid-run.Homebrew
caskruns it from installer artifacts,finkre-execs its root commands through it, and the AUR helpers callsudo pacmanfor their install steps. mpm never wraps such a manager’s commands: either none of its operations carry abuild_cli(..., sudo=True)marker (cask,fink), or itsdefault_sudo = Falsepolicy leaves the markers it inherits unescalated (the AUR helpers). Running the tool undersudois often forbidden outright (brewrefuses root,makepkgrefuses to build). Consumed byprime_sudo(), whose opportunistic probe keeps an already-warm credential cache alive for these internal escalations, and by the silent-call notice inrun(), which flags a possibly-hidden password prompt on a cold cache.Forcing
sudo = trueon such a manager (config key or--sudo) still never wraps its commands, but does promote it into the up-front prompt path ofprime_sudo().
- requirement: str | None = '>=6.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.
- extra_env: ClassVar = {'DISABLE_PROMPTS': '1', 'NO_COLOR': '1'}¶
Suppress ANSI colors and disable interactive prompts.
- version_regexes: tuple[str, ...] = ('(?P<version>\\d+\\.\\d+\\.\\d+)',)¶
$ pacstall --version 6.3.7 Vanilla
- property installed: Iterator[Package]¶
Fetch installed packages.
$ pacstall --list neofetch neovim
Note
When piped,
pacstall --listoutputs bare package names without versions. A follow-uppacstall --cache-info <pkg> versioncall retrieves the installed version per package.
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ pacstall --list-upgrades Upgradable: 2 neofetch @ pacstall-programs#master ( 7.1.0-2 -> 7.2.0-1 ) neovim @ pacstall-programs#master ( 0.9.4-1 -> 0.10.0-1 )
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not support extended or exact matching, and does not provide version information. Returns the best subset of results and lets
meta_package_manager.manager.PackageManager.refiltered_search()refine them.$ pacstall --search neovim neovim @ pacstall-programs neovim-git @ pacstall-programs
- install(package_id, version=None)[source]¶
Install one package.
$ pacstall --install neofetch
- Return type:
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade one package by reinstalling it.
$ pacstall --install neofetch
- cli_names: tuple[str, ...] = ('pacstall',)¶
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 = 'pacstall'¶
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.