meta_package_manager.managers package¶
Submodules¶
meta_package_manager.managers.apk module¶
- class meta_package_manager.managers.apk.APK[source]¶
Bases:
PackageManagerAlpine Package Keeper (
apk) used by Alpine Linux.Documentation: https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper
Initialize
cli_errorslist.- homepage_url: str | None = 'https://gitlab.alpinelinux.org/alpine/apk-tools'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({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='cloudlinux', name='CloudLinux OS'), Platform(id='debian', name='Debian'), 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='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='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='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=2.10.0'¶
The
listapplet, used byinstalled()andoutdated(), was introduced in version2.10.0.
- pre_args: tuple[str, ...] = ('--no-progress',)¶
Suppress progress indicators so log lines are stable when parsing.
Source:
apk(8)global options.
- version_regexes: tuple[str, ...] = ('apk-tools\\s+(?P<version>[^\\s,]+)',)¶
$ apk --version apk-tools 2.14.10, compiled for x86_64.
- property installed: Iterator[Package]¶
Fetch installed packages.
$ apk --no-progress list --installed acl-2.2.53-r0 x86_64 {acl} (LGPL-2.1-or-later AND GPL-2.0-or-later) [installed] alpine-baselayout-3.4.3-r1 x86_64 {alpine-baselayout} (GPL-2.0-only) [installed] apk-tools-2.14.0-r5 x86_64 {apk-tools} (GPL-2.0-only) [installed] busybox-1.36.1-r5 x86_64 {busybox} (GPL-2.0-only) [installed] python3-3.11.6-r0 x86_64 {python3} (PSF-2.0) [installed]
- property outdated: Iterator[Package]¶
Fetch outdated packages.
Caution
Reads from the local repository cache. Run
sync()first to refresh the index.$ apk --no-progress list --upgradable acl-2.3.1-r0 x86_64 {acl} (LGPL-2.1-or-later) [upgradable from: acl-2.2.53-r0] python3-3.11.7-r0 x86_64 {python3} (PSF-2.0) [upgradable from: python3-3.11.6-r0]
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
apk searchmatches package names with case-insensitive substring globbing. Exact matching is not supported and is handled bymeta_package_manager.base.PackageManager.refiltered_search(). Extended search adds the--descriptionflag so the query is also matched against package descriptions.$ apk --no-progress search --verbose firefox firefox-120.0-r0 firefox-esr-115.5.0-r0 firefox-langpack-de-120.0-r0
$ apk --no-progress search --verbose --description ntp chrony-4.4-r1 ntp-4.2.8_p17-r0 openntpd-6.8_p1-r1
- cli_names: tuple[str, ...] = ('apk',)¶
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 = 'apk'¶
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.
- install(package_id, version=None)[source]¶
Install one package.
$ sudo apk --no-progress add firefox
- Return type:
- 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.
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages.
$ sudo apk --no-progress upgrade
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade one package.
$ sudo apk --no-progress upgrade firefox
meta_package_manager.managers.apm module¶
- class meta_package_manager.managers.apm.APM[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- deprecated: bool = True¶
A manager marked as deprecated will be hidden from all package selection by default.
You can still use it but need to explicitly call for it on the command line.
Implementation of a deprecated manager will be kept within mpm source code, but some of its features or total implementation are allowed to be scraped in the face of maintenance pain and adversity.
Integration tests and unittests for deprecated managers can be removed. We do not care if a deprecated manager is not 100% reliable. A flakky deprecated manager should not block a release due to flakky tests.
- deprecation_url: str | None = 'https://github.blog/2022-06-08-sunsetting-atom/'¶
GitHub announced the end of the project for December 15, 2022. Source: https://github.blog/2022-06-08-sunsetting-atom/
There is a tentative community fork being discussed. See: https://github.com/atom-community/apm
In the mean time, as long as no apm alternative is useable, it is safe to tag this manager as deprecated.
- name: str = "Atom's apm"¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://atom.io/packages'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({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='cloudlinux', name='CloudLinux OS'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='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='midnightbsd', name='MidnightBSD'), Platform(id='netbsd', name='NetBSD'), 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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.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, ...] = ('apm\\s+(?P<version>\\S+)',)¶
$ apm --version apm 2.6.2 npm 6.14.13 node 12.14.1 x64 atom 1.58.0 python 2.7.16 git 2.33.0
- property installed: Iterator[Package]¶
Fetch installed packages.
$ apm list --json | jq { "core": [ { "_args": [ [ { "raw": "/private/var/folders/(...)/package.tgz", "scope": null, "escapedName": null, "name": null, "rawSpec": "/private/var/folders/(...)/package.tgz", "spec": "/private/var/folders/(...)/package.tgz", "type": "local" }, "/Users/distiller/atom" ] ], "_inCache": true, "_installable": true, "_location": "/background-tips", "_phantomChildren": {}, "_requested": { "raw": "/private/var/folders/(...)/package.tgz", "scope": null, "escapedName": null, "name": null, "rawSpec": "/private/var/folders/(...)/package.tgz", "spec": "/private/var/folders/(...)/package.tgz", "type": "local" }, "_requiredBy": [ "#USER" ], "_resolved": "file:../../../private/var/(...)/package.tgz", "_shasum": "7978e4fdab3b162d93622fc64d012df7a92aa569", "_shrinkwrap": null, "_spec": "/private/var/folders/(...)/package.tgz", "_where": "/Users/distiller/atom", "bugs": { "url": "https://github.com/atom/background-tips/issues" }, "dependencies": { "underscore-plus": "1.x" }, "description": "Displays tips about Atom in the background.", "devDependencies": { "coffeelint": "^1.9.7" }, "engines": { "atom": ">0.42.0" }, "homepage": "https://github.com/atom/background-tips#readme", "license": "MIT", "main": "./lib/background-tips", "name": "background-tips", "optionalDependencies": {}, "private": true, "repository": { "type": "git", "url": "https://github.com/atom/background-tips.git" }, "version": "0.26.1", "_atomModuleCache": { "version": 1, "dependencies": [], "extensions": { ".js": [ "lib/background-tips-view.js", "lib/background-tips.js", "lib/tips.js" ] }, "folders": [ { "paths": [ "lib", "" ], "dependencies": { "underscore-plus": "1.x" } } ] } }, (...) ] }
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ apm outdated --compatible --json | jq [ { "_args": [ [ { "raw": "/private/var/folders/(...)/package.tgz", "scope": null, "escapedName": null, "name": null, "rawSpec": "/private/var/folders/(...)/package.tgz", "spec": "/private/var/folders/(...)/package.tgz", "type": "local" }, "/private/var/folders/(...)/apm-install-dir-117017" ] ], "_from": "../d-117017-63877-vcgh4t/package.tgz", "_id": "file-icons@2.0.9", "_inCache": true, "_installable": true, "_location": "/file-icons", "_phantomChildren": {}, "_requested": { "raw": "/private/var/folders/(...)/package.tgz", "scope": null, "escapedName": null, "name": null, "rawSpec": "/private/var/folders/(...)/package.tgz", "spec": "/private/var/folders/(...)/package.tgz", "type": "local" }, "_requiredBy": [ "#USER" ], "_resolved": "file:../d-117017-63877-vcgh4t/package.tgz", "_shasum": "8b2df93ad752af1676d91c12afa068f2000b864c", "_shrinkwrap": null, "_spec": "/private/var/folders/(...)/package.tgz", "_where": "/private/var/folders/(...)/apm-install-dir-117017", "atom-mocha": { "interactive": { "mocha": { "bail": true } } }, "atomTestRunner": "./node_modules/.bin/atom-mocha", "bugs": { "url": "https://github.com/file-icons/atom/issues" }, "configSchema": { "coloured": { "type": "boolean", "default": true, "description": "Untick this for colourless icons", "order": 1 }, "onChanges": { "type": "boolean", "default": false, "title": "Only colour when changed", "description": "Show different icon.", "order": 2 }, "tabPaneIcon": { "type": "boolean", "default": true, "title": "Show icons in file tabs", "order": 3 }, "defaultIconClass": { "type": "string", "default": "default-icon", "title": "Default icon class", "description": "CSS added to files that lack an icon.", "order": 4 }, "strategies": { "type": "object", "title": "Match strategies", "description": "Advanced settings for icon assignment.", "order": 5, "properties": { "grammar": { "type": "boolean", "default": true, "order": 1, "title": "Change on grammar override", "description": "Change a file's icon when setting." }, "hashbangs": { "type": "boolean", "default": true, "order": 2, "title": "Check hashbangs", "description": "Allow lines like `#!/usr/bin/perl`." } } } }, "dependencies": { "micromatch": "*" }, "description": "Assign file extension icons", "devDependencies": { "atom-mocha": "*", "coffee-script": "*", "get-options": "*", "rimraf": "*", "tmp": "*", "unzip": "*" }, "engines": { "atom": ">1.11.0" }, "homepage": "https://github.com/file-icons/atom", "license": "MIT", "main": "lib/main.js", "name": "file-icons", "optionalDependencies": {}, "private": true, "providedServices": { "file-icons.element-icons": { "versions": { "1.0.0": "provideService" } }, "atom.file-icons": { "versions": { "1.0.0": "suppressFOUC" } } }, "readme": "Blah blah", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/file-icons/atom.git" }, "version": "2.0.9", "latestVersion": "2.0.10" } ]
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not supports exact matching.
$ apm search --json python | jq [ { "name": "atom-python-run", "main": "./lib/atom-python-run.js", "version": "0.7.3", "description": "Run a python source file.", "keywords": [ "python" ], "repository": "https://github.com/foreshadow/atom-python-run", "license": "MIT", "engines": { "atom": ">=1.0.0 <2.0.0" }, "dependencies": {}, "readme": "Blah blah", "downloads": 41379, "stargazers_count": 16 }, { "name": "build-python", "version": "0.6.3", "description": "Atom Build provider for python/python3", "repository": "https://github.com/idleberg/atom-build-python", "license": "MIT", "keywords": [ "buildprovider", "compile", "python", "python3", "linter", "lint" ], "main": "lib/provider.js", "engines": { "atom": ">=1.0.0 <2.0.0" }, "providedServices": { "builder": { "description": "Compiles Python", "versions": { "2.0.0": "provideBuilder" } } }, "package-deps": [ "build" ], "dependencies": { "atom-package-deps": "^4.3.1" }, "devDependencies": { "babel-eslint": "^7.1.1", "coffeelint-stylish": "^0.1.2", "eslint": "^3.13.1", "eslint-config-atom-build": "^4.0.0", "gulp": "github:gulpjs/gulp#4.0", "gulp-coffeelint": "^0.6.0", "gulp-debug": "^3.0.0", "gulp-jshint": "^2.0.4", "gulp-jsonlint": "^1.2.0", "gulp-lesshint": "^2.1.0", "jshint": "^2.9.4" }, "scripts": { "test": "gulp lint" }, "readme": "Blah blah", "downloads": 2838, "stargazers_count": 0 }, (...) ]
$ apm search --no-description --json python | jq
- install(package_id, version=None)[source]¶
Install one package.
$ apm install image-view The image-view package is bundled with Atom and should not be explicitly installed. You can run `apm uninstall image-view` to uninstall it and then the version bundled with Atom will be used. Installing image-view to /Users/kde/.atom/packages ✓
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ apm update --no-confirm
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ apm update --no-confirm image-view
- cli_names: tuple[str, ...] = ('apm',)¶
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 = 'apm'¶
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.
meta_package_manager.managers.apt module¶
- class meta_package_manager.managers.apt.APT[source]¶
Bases:
PackageManagerBase package manager shared by variation of the apt command.
Documentation: - https://wiki.debian.org/AptCLI - http://manpages.ubuntu.com/manpages/xenial/man8/apt.8.html
See other command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta
Initialize
cli_errorslist.- homepage_url: str | None = 'https://wiki.debian.org/AptCLI'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.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.
- property installed: Iterator[Package]¶
Fetch installed packages.
$ apt --quiet list --installed Listing... adduser/xenial,now 3.113+nmu3ubuntu4 all [installed] bc/xenial,now 1.06.95-9build1 amd64 [installed] bsdmainutils/xenial,now 9.0.6ubuntu3 amd64 [installed,automatic] ca-certificates/xenial,now 20160104ubuntu1 all [installed] cron/xenial,now 3.0pl1-128ubuntu2 amd64 [installed] debconf/xenial,now 1.5.58ubuntu1 all [installed] debianutils/xenial,now 4.7 amd64 [installed] diffutils/xenial,now 1:3.3-3 amd64 [installed] e2fsprogs/xenial,now 1.42.13-1ubuntu1 amd64 [installed] ethstatus/xenial,now 0.4.3ubuntu2 amd64 [installed] file/xenial,now 1:5.25-2ubuntu1 amd64 [installed] findutils/xenial,now 4.6.0+git+20160126-2 amd64 [installed] libidn2-0/jammy,now 2.3.2-2build1 amd64 [installed,automatic] libidn2-0/jammy,now 2.3.2-2build1 i386 [installed,automatic]
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ apt --quiet list --upgradable Listing... apt/xenial-updates 1.2.19 amd64 [upgradable from: 1.2.15ubuntu0.2] nano/xenial-updates 2.5.3-2ubuntu2 amd64 [upgradable from: 2.5.3-2]
- search(query, extended, exact)[source]¶
Fetch matching packages.
$ apt --quiet search abc --names-only Sorting... Full Text Search... abcde/xenial 2.7.1-1 all A Better CD Encoder abcmidi/xenial 20160103-1 amd64 converter from ABC to MIDI format and back berkeley-abc/xenial 1.01+20150706hgc3698e0+dfsg-2 amd64 ABC - A System for Sequential Synthesis and Verification fuse-overlayfs/jammy,now 1.7.1-1 amd64 [installed] implementation of overlay+shiftfs in FUSE for rootless containers grabcd-rip/xenial 0009-1 all rip and encode audio CDs - ripper libakonadi-kabc4/xenial 4:4.14.10-1ubuntu2 amd64 Akonadi address book access library
$ apt --quiet search ^sed$ --names-only Sorting... Full Text Search... sed/xenial 2.1.9-3 all Blah blah blah
$ apt --quiet search abc --full Sorting... Full Text Search... abcde/xenial 2.7.1-1 all This package contains the essential basic system utilities. . Specifically, this package includes: basename cat chgrp chmod chown chroot cksum comm cp csplit cut dircolors dirname du echo env expand expr factor false fmt hostid id install join link ln logname ls md5sum mkdir mkfifo nohup od paste pathchk pinky pr printenv printf ptx pwd sha1sum seq shred sleep sort split stat stty sum sync tac tail tr true tsort tty uname unexpand uniq unlink users vdir wc who (...) midi/xenial 20160103-1 amd64 converter from ABC to MIDI format and back
- install(package_id, version=None)[source]¶
Install one package.
$ sudo apt --quiet --yes install git
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo apt --quiet --yes upgrade
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo apt --quiet --yes install --only-upgrade git
- sync()[source]¶
Sync package metadata.
$ sudo apt --quiet --yes update Hit:1 http://archive.ubuntu.com xenial InRelease Get:2 http://archive.ubuntu.com xenial-updates InRelease [102 kB] Get:3 http://archive.ubuntu.com xenial-security InRelease [102 kB] Get:4 http://archive.ubuntu.com xenial/main Translation-en [568 kB] Fetched 6,868 kB in 2s (2,680 kB/s) Reading package lists... Building dependency tree... Reading state information...
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
$ sudo apt --quiet --yes autoremove $ sudo apt --quiet --yes clean
- Return type:
- cli_names: tuple[str, ...] = ('apt',)¶
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 = 'apt'¶
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.
- class meta_package_manager.managers.apt.APT_Mint[source]¶
Bases:
APTSpecial version of apt for Linux Mint.
Exactly the same as its parent but implement specific version extraction.
Initialize
cli_errorslist.- name: str = "Linux Mint's apt"¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/kdeldycke/meta-package-manager/issues/52'¶
Home page of the project, only used in documentation for reference.
- cli_names: tuple[str, ...] = ('apt',)¶
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 = 'apt-mint'¶
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.
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not supports extended matching.
$ /usr/local/bin/apt --quiet search sed v librust-slog-2.5+erased-serde-dev - p python3-blessed - Practical wrapper i sed - GNU stream editor p sed:i386 - GNU stream editor
$ /usr/local/bin/apt --quiet search ^sed$ i sed - GNU stream editor p sed:i386 - GNU stream editor
meta_package_manager.managers.cargo module¶
- class meta_package_manager.managers.cargo.Cargo[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- name: str = "Rust's cargo"¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://doc.rust-lang.org/cargo/'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.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.
- property installed: Iterator[Package]¶
Fetch installed packages.
$ cargo --color never --quiet install --list bore-cli v0.4.0: bore ripgrep v13.0.0: rg
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not support extended or exact matching. So we returns the best subset of results and let
meta_package_manager.base.PackageManager.refiltered_search()refine them.$ cargo --color never --quiet search --limit 100 python python = "0.0.0" # Python. pyo3-asyncio = "0.16.0" # PyO3 utilities for Python's Asyncio pyo3-asyncio-macros = "0.16.0" # Proc Macro Attributes for PyO3 Asyncio pyo3 = "0.16.4" # Bindings to Python interpreter pyenv-python = "0.4.0" # A pyenv shim for python python-launcher = "1.0.0" # The Python launcher for Unix py-spy = "0.3.11" # Sampling profiler for Python programs python_mixin = "0.0.0" # Use Python to generate your Rust, right… pyflow = "0.3.1" # A modern Python dependency manager pypackage = "0.0.3" # A modern Python dependency manager ... and 1664 crates more (use --limit N to see more)
- install(package_id, version=None)[source]¶
Install one package.
$ cargo --color never install bore-cli Updating crates.io index Downloaded bore-cli v0.4.0 Downloaded 1 crate (20.9 KB) in 0.26s Installing bore-cli v0.4.0 Downloaded serde_derive v1.0.137 Downloaded unicode-xid v0.2.3 Downloaded clap_lex v0.2.0 (...) Compiling bore-cli v0.4.0 Finished release [optimized] target(s) in 1m 06s Replacing /home/mawoka/.cargo/bin/bore Replaced `bore-cli v0.2.3` with `bore-cli v0.4.0` (executable `bore`)
- Return type:
- cli_names: tuple[str, ...] = ('cargo',)¶
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 = 'cargo'¶
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.
- remove(package_id)[source]¶
Remove one package.
$ cargo --color never uninstall bore-cli Removing /Users/me/.cargo/bin/bore
- Return type:
meta_package_manager.managers.chocolatey module¶
- class meta_package_manager.managers.chocolatey.Choco[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- name: str = 'Chocolatey'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://chocolatey.org'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='windows', name='Windows')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=2.0.0'¶
2.0.0is the first version which is not requiring the--local-onlyoption, which has been entirely removed.Source: choco options and switches.
- post_args: tuple[str, ...] = ('--no-progress', '--no-color', '--retry-count=3')¶
Global list of options used before and after the invoked package manager CLI.
Automatically added to each
meta_package_manager.base.PackageManager.run_cli()call.Essentially used to force silencing, low verbosity or no-color output.
- property installed: Iterator[Package]¶
Fetch installed packages.
> choco list --limit-output --no-progress --no-color --retry-count=3 adobereader|11.0.10 ccleaner|5.03.5128 chocolatey|0.9.9.2 ConEmu|14.9.23.0 gimp|2.8.14.1 git|1.9.5.20150114
- property outdated: Iterator[Package]¶
Fetch outdated packages.
> choco outdated --limit-output --no-progress --no-color --retry-count=3 7zip.commandline|16.02.0.20170209|16.02.0.20170209|false 7zip.portable|18.1|18.1|false atom|1.23.3|1.24.0|false autohotkey.portable|1.1.28.00|1.1.28.00|false bulkrenameutility|3.0.0.1|3.0.0.1|false bulkrenameutility.install|3.0.0.1|3.0.0.1|false calibre|3.17.0|3.17.0|false chocolatey|0.10.8|0.10.8|false
- search(query, extended, exact)[source]¶
Fetch matching packages.
> choco search VirtualBox --limit-output --no-progress --no-color --retry-count=3 virtualbox|6.1.0 VirtualBox.ExtensionPack|5.1.10.20161223 enigmavirtualbox|9.20 virtualbox-guest-additions-guest.install|6.1.0 VBoxHeadlessTray|4.2.0.3 VBoxVmService|6.1 multipass|1.0.0
> choco search VirtualBox --by-id-only --limit-output --no-progress --no-color --retry-count=3 virtualbox|6.1.0 VirtualBox.ExtensionPack|5.1.10.20161223 enigmavirtualbox|9.20 virtualbox-guest-additions-guest.install|6.1.0
> choco search VirtualBox --by-id-only --exact --limit-output --no-progress --no-color --retry-count=3 virtualbox|6.1.0
> choco search virtualbox --exact --limit-output --no-progress --no-color --retry-count=3 virtualbox|6.1.0
- install(package_id, version=None)[source]¶
Install one package.
> choco install ccleaner --yes --limit-output --no-progress --no-color --retry-count=3
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
> choco upgrade all --yes --limit-output --no-progress --no-color --retry-count=3
- cli_names: tuple[str, ...] = ('choco',)¶
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 = 'choco'¶
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.
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
> choco upgrade ccleaner --yes --limit-output --no-progress --no-color --retry-count=3
meta_package_manager.managers.composer module¶
- class meta_package_manager.managers.composer.Composer[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- name: str = "PHP's Composer"¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://getcomposer.org'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.4.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, ...] = ('Composer\\s+version\\s+(?P<version>\\S+)',)¶
$ composer --version Composer version 2.1.8 2021-09-15 13:55:14
- property installed: Iterator[Package]¶
Fetch installed packages.
$ composer global show --format=json | jq { "installed": [ { "name": "carbondate/carbon", "version": "1.33.0", "description": "A simple API extension for DateTime." }, { "name": "guzzlehttp/guzzle", "version": "6.3.3", "description": "Guzzle is a PHP HTTP client library" }, { "name": "guzzlehttp/promises", "version": "v1.3.1", "description": "Guzzle promises library" }, { "name": "guzzlehttp/psr7", "version": "1.4.2", "description": "PSR-7 message (...) methods" }, (...)
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ composer global outdated --format=json { "installed": [ { "name": "illuminate/contracts", "version": "v5.7.2", "latest": "v5.7.3", "latest-status": "semver-safe-update", "description": "The Illuminate Contracts package." }, { "name": "illuminate/support", "version": "v5.7.2", "latest": "v5.7.3", "latest-status": "semver-safe-update", "description": "The Illuminate Support package." } ] }
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not supports exact matching.
$ composer global search symfony symfony/symfony The Symfony PHP framework symfony/yaml Symfony Yaml Component symfony/var-dumper Symfony (...) dumping PHP variables symfony/translation Symfony Translation Component symfony/routing Symfony Routing Component symfony/process Symfony Process Component symfony/polyfill-php70 Symfony (...) features to lower PHP versions symfony/polyfill-mbstring Symfony (...) Mbstring extension symfony/polyfill-ctype Symfony polyfill for ctype functions symfony/http-kernel Symfony HttpKernel Component symfony/http-foundation Symfony HttpFoundation Component symfony/finder Symfony Finder Component symfony/event-dispatcher Symfony EventDispatcher Component symfony/debug Symfony Debug Component symfony/css-selector Symfony CssSelector Component
$ composer global search --only-name python hiqdev/hidev-python aanro/pythondocx laravel-admin-ext/python-editor pythonphp/pythonphp blyxxyz/python-server nim-development/python-domotics rakshitbharat/pythoninphp tequilarapido/python-bridge
$ search global --only-name pythonphp/pythonphp pythonphp/pythonphp
- install(package_id, version=None)[source]¶
Install one package.
$ composer global require illuminate/contracts
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ composer global update
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ composer global update illuminate/contracts
- remove(package_id)[source]¶
Remove one package.
$ composer global remove illuminate/contracts
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
See: https://getcomposer.org/doc/03-cli.md#clear-cache-clearcache-cc
$ composer global clear-cache
- Return type:
- cli_names: tuple[str, ...] = ('composer',)¶
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 = 'composer'¶
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.
meta_package_manager.managers.cpan module¶
- class meta_package_manager.managers.cpan.CPAN[source]¶
Bases:
PackageManagerThe Comprehensive Perl Archive Network package manager.
Tip
Installs may require
sudowhen using the system Perl. Consider usinglocal::libfor user-local installs.Caution
On first run,
cpanmay launch an interactive configuration. This is suppressed by thePERL_MM_USE_DEFAULTenvironment variable.Initialize
cli_errorslist.- name: str = "Perl's CPAN"¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://www.cpan.org'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.64'¶
$ cpan -v >(info): /usr/bin/cpan script version 1.676, CPAN.pm version 2.28
- extra_env: ClassVar = {'PERL_MM_USE_DEFAULT': '1'}¶
Suppress interactive prompts during install and configuration.
- version_cli_options: tuple[str, ...] = ('-v',)¶
CLI options used to produce the version of the package manager.
The raw output produced by the package manager CLI will be parsed with the
version_regexesbelow to extract the version number.
- version_regexes: tuple[str, ...] = ('CPAN\\.pm\\s+version\\s+(?P<version>\\S+)',)¶
$ cpan -v >(info): /usr/bin/cpan script version 1.676, CPAN.pm version 2.28
- property installed: Iterator[Package]¶
Fetch installed packages.
$ cpan -l 2>/dev/null Loading internal logger. Log::Log4perl recommended for better logging O 1.03 Errno 1.33 Config 5.034001 Encode 3.08_01 meta_notation undef
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ cpan -O 2>/dev/null Loading internal logger. Log::Log4perl recommended for better logging Reading '/Users/kde/.cpan/Metadata' Database was generated on Thu, 26 Mar 2026 13:41:03 GMT Module Name Local CPAN --------------------------------------------------------------- Algorithm::C3 0.1000 0.1100 Archive::Tar 2.3800 3.0400 App::Cpan 1.6760 1.6780
- cli_names: tuple[str, ...] = ('cpan',)¶
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 = 'cpan'¶
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.
meta_package_manager.managers.dnf module¶
- class meta_package_manager.managers.dnf.DNF[source]¶
Bases:
PackageManagerDocumentation: https://dnf.readthedocs.io/en/latest/command_ref.html.
See other command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta
Initialize
cli_errorslist.- homepage_url: str | None = 'https://github.com/rpm-software-management/dnf'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- 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.
- DELIMITER = '___MPM___'¶
- property installed: Iterator[Package]¶
Fetch installed packages.
$ dnf repoquery --userinstalled --qf FORMAT Installed Packages acl 2.2.53-1.el8 annaconda_dummary x86_64 audit 2.2.53-1.el8 audit_dummary x86_64 audit-libs 2.2.53-1.el8 audit_libs_dummary x86_64 (...)
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ dnf repoquery --upgrades --qf FORMAT Installed Packages acl 2.2.53-1.el8 2.6.53-1.el8 annaconda_dummary x86_64 audit 2.2.53-1.el8 2.5.53-1.el8 audit_dummary x86_64 audit-libs 2.2.53-1.el8 2.6.53-1.el8 audit_libs_dummary x86_64 (...)
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not support extended or exact matching. So we returns the best subset of results and let
meta_package_manager.base.PackageManager.refiltered_search()refine them.$ dnf --color=never search usd Last metadata expiration check: 0:06:37 ago on Sun 03 Apr 2022. =================== Name Exactly Matched: usd ===================== usd.aarch64 : 3D VFX pipeline interchange file format =================== Name & Summary Matched: usd =================== python3-usd.aarch64 : Development files for USD usd-devel.aarch64 : Development files for USD ======================= Name Matched: usd ========================= lvm2-dbusd.noarch : LVM2 D-Bus daemon usd-libs.aarch64 : Universal Scene Description library
- install(package_id, version=None)[source]¶
Install one package.
$ sudo dnf --color=never --assumeyes install pip
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo dnf --color=never --assumeyes upgrade
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo dnf --color=never --assumeyes upgrade pip
- remove(package_id)[source]¶
Remove one package and one only.
$ sudo dnf --color=never --assumeyes autoremove package_id
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
$ sudo dnf --color=never --assumeyes autoremove $ dnf --color=never clean all
- Return type:
- class meta_package_manager.managers.dnf.DNF5[source]¶
Bases:
DNFInitialize
cli_errorslist.- homepage_url: str | None = 'https://github.com/rpm-software-management/dnf5'¶
Home page of the project, only used in documentation for reference.
- pre_args: tuple[str, ...] = ('--quiet',)¶
Reset global options inherited from the DNF above.
dnf5 does not support –color=never parameter.
- class meta_package_manager.managers.dnf.YUM[source]¶
Bases:
DNFYum is dnf is yum.
Initialize
cli_errorslist.- id: str = 'yum'¶
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.
meta_package_manager.managers.emerge module¶
- class meta_package_manager.managers.emerge.Emerge[source]¶
Bases:
PackageManagerThe Gentoo package manager.
Documentation: - https://wiki.gentoo.org/wiki/Portage#emerge - https://dev.gentoo.org/~zmedico/portage/doc/man/emerge.1.html
See other command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta
Initialize
cli_errorslist.- homepage_url: str | None = 'https://wiki.gentoo.org/wiki/Portage#emerge'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=3.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, ...] = ('Portage\\s+(?P<version>\\S+)',)¶
$ emerge --version Portage 3.0.30 (python 3.9.9-final-0, gcc-11.2.1, 5.15.32-gentoo-r1 x86_64)
- property installed: Iterator[Package]¶
Fetch installed packages.
Warning
This suppose the
qlistbinary is available and present on the system. We do not search for it or try to resolves its canonical path withPackageManager.cli_path, as we do for the referenceemergebinary.$ qlist --installed --verbose --nocolor acct-group/audio-0-r1 acct-group/cron-0 app-admin/hddtemp-0.3_beta15-r29 app-admin/perl-cleaner-2.30 app-admin/system-config-printer-1.5.16-r1 app-arch/p7zip-16.02-r8
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ emerge --update --deep --pretend --columns --color n --nospinner @world [blocks B ] app-text/dos2unix [ebuild N ] app-games/qstat [25c] [ebuild R ] sys-apps/sed [2.4.7-r6] [ebuild U] net-fs/samba [2.2.8_pre1] [2.2.7a] [ebuild U] sys-devel/distcc [2.16] [2.13-r1] USE=ip6* -gtk [ebuild r U] dev-libs/icu [50.1.1:0/50.1.1] [50.1-r2:0/50.1] [ebuild r R ] dev-libs/libxml2 [2.9.0-r1:2] USE=icu
- search(query, extended, exact)[source]¶
Fetch matching packages.
$ emerge --search --color n --nospinner blah [ Results for search key : blah ] Searching... * sys-process/htop Latest version available: 1.0.2-r1 Latest version installed: [ Not Installed ] Size of files: 380 KiB Homepage: http://htop.sourceforge.net Description: interactive process viewer License: BSD GPL-2 * x11-drivers/nvidia-drivers Latest version available: 455.45.01-r1 Latest version installed: [ Not Installed ] Size of files: 180.214 KiB Homepage: https://www.nvidia.com/Download/Find.aspx Description: NVIDIA Accelerated Graphics Driver License: GPL-2 NVIDIA-r2 [ Applications found : 2 ]
$ emerge --search --color n --nospinner %^sed$
$ emerge --searchdesc --color n --nospinner sed
$ emerge --searchdesc --color n --nospinner %^sed$
- install(package_id, version=None)[source]¶
Install one package.
$ sudo emerge --color n --nospinner dev-vcs/git
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo emerge --update --newuse --deep --color n --nospinner @world
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo emerge --update --color n --nospinner dev-vcs/git
- remove(package_id)[source]¶
Remove one package.
$ sudo emerge --unmerge --color n --nospinner dev-vcs/git
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
An update is forced before calling the clean commands, as pointed to by the emerge documentation:
> As a safety measure, depclean will not remove any packages unless all > required dependencies have been resolved. As a consequence, it is often > necessary to run emerge –update –newuse –deep @world prior to depclean.
Warning
This suppose the
ecleanbinary is available and present on the system. We do not search for it or try to resolves its canonical path withPackageManager.cli_path, as we do for the referenceemergebinary.$ sudo emerge --update --newuse --deep --color n --nospinner @world $ sudo emerge --depclean $ sudo eclean distfiles
- Return type:
- cli_names: tuple[str, ...] = ('emerge',)¶
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 = 'emerge'¶
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.
meta_package_manager.managers.eopkg module¶
- class meta_package_manager.managers.eopkg.EOPKG[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- name: str = 'Solus package manager'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/getsolus/eopkg/'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({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='cloudlinux', name='CloudLinux OS'), Platform(id='debian', name='Debian'), 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='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='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='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=3.2.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.
- property installed: Iterator[Package]¶
Fetch installed packages.
$ eopkg --no-color list-installed --install-info Package Name |St| Version| Rel.| Distro| Date ===================================================================== aalib | i| 1.4.0_5| 8| Solus|14 Oct 2024 abseil-cpp | i| 20240116.2| 10| Solus|14 Oct 2024 accountsservice | i| 23.13.9| 36| Solus|14 Oct 2024 acl | i| 2.3.2| 21| Solus|14 Oct 2024 adwaita-icon-theme | i| 46.2| 28| Solus|14 Oct 2024 adwaita-icon-theme-legacy | i| 46.2| 2| Solus|14 Oct 2024 alsa-firmware | i| 1.2.4| 7| Solus|14 Oct 2024 alsa-lib | i| 1.2.12| 38| Solus|14 Oct 2024 alsa-plugins | i| 1.2.12| 26| Solus|14 Oct 2024 alsa-utils | i| 1.2.12| 28| Solus|14 Oct 2024 aom | i| 3.10.0| 24| Solus|14 Oct 2024 appstream | i| 1.0.1| 9| Solus|14 Oct 2024 appstream-data | i| 49| 51| Solus|14 Oct 2024 appstream-glib | i| 0.8.2| 13| Solus|14 Oct 2024 argon2 | i| 20190702| 6| Solus|14 Oct 2024 at-spi2 | i| 2.52.0| 44| Solus|14 Oct 2024 atkmm | i| 2.28.4| 19| Solus|14 Oct 2024 attr | i| 2.5.2| 25| Solus|14 Oct 2024 audit | i| 4.0.2| 19| Solus|14 Oct 2024 avahi | i| 0.8| 27| Solus|14 Oct 2024 baobab | i| 46.0| 27| Solus|14 Oct 2024
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ eopkg --no-color list-upgrades --install-info Package Name |St| Version| Rel.| Distro| Date ===================================================================== adwaita-icon-theme | i| 46.2| 28| Solus|14 Oct 2024 appstream-data | i| 49| 51| Solus|14 Oct 2024 at-spi2 | i| 2.52.0| 44| Solus|14 Oct 2024 baobab | i| 46.0| 27| Solus|14 Oct 2024
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not supports exact matching.
Naked search without parameters is the same as extended search with all filtering parameters (i.e.
--name --summary --description):$ eopkg --no-color search firefox gjs-dbginfo - Debug symbols for gjs bleachbit - BleachBit frees disk space and maintains privacy firefox - Firefox web browser eid-mw-firefox - Belgian eID add-on for Mozilla Firefox gjs - GNOME JavaScript font-fira-ttf - Mozilla's new typeface, used in Firefox OS geckodriver - WebDriver for Firefox firefox-dbginfo - Debug symbols for firefox nvidia-vaapi-driver-dbginfo - Debug symbols for nvidia-vaapi-driver font-clear-sans-ttf - Clear Sans Fonts - TrueType gjs-devel - Development files for gjs geckodriver-dbginfo - Debug symbols for geckodriver $ eopkg --no-color search firefox --name --summary --description gjs-dbginfo - Debug symbols for gjs bleachbit - BleachBit frees disk space and maintains privacy firefox - Firefox web browser eid-mw-firefox - Belgian eID add-on for Mozilla Firefox gjs - GNOME JavaScript font-fira-ttf - Mozilla's new typeface, used in Firefox OS geckodriver - WebDriver for Firefox firefox-dbginfo - Debug symbols for firefox nvidia-vaapi-driver-dbginfo - Debug symbols for nvidia-vaapi-driver font-clear-sans-ttf - Clear Sans Fonts - TrueType gjs-devel - Development files for gjs geckodriver-dbginfo - Debug symbols for geckodriver
For default search on package name only, we rescript filtering to
--nameonly:$ eopkg --no-color search firefox --name firefox - Firefox web browser eid-mw-firefox - Belgian eID add-on for Mozilla Firefox firefox-dbginfo - Debug symbols for firefox
- install(package_id, version=None)[source]¶
Install one package.
$ sudo eopkg --no-color install --yes-all 0ad Warning: Updates available, checking reverse dependencies of runtime dependencies for safety. Following packages will be installed: 0ad 0ad-data assimp at-spi2 baobab breeze-icons budgie-control-center budgie-desktop dav1d enet evolution-data-server ffmpeg file-roller firefox fmt fontconfig gcr-4 gloox gnome-calculator gnome-calendar gnome-online-accounts gnome-settings-daemon gnome-system-monitor gnome-terminal gvfs harfbuzz ibus kf6-karchive kf6-kauth kf6-kbookmarks kf6-kcodecs kf6-kcolorscheme kf6-kcompletion kf6-kconfig kf6-kconfigwidgets kf6-kcoreaddons kf6-kcrash kf6-kdbusaddons kf6-kded kf6-kdoctools kf6-kglobalaccel kf6-kguiaddons kf6-ki18n kf6-kiconthemes kf6-kio kf6-kitemviews kf6-kjobwidgets kf6-knotifications kf6-kparts kf6-kservice kf6-kwallet kf6-kwidgetsaddons kf6-kwindowsystem kf6-kxmlgui kf6-solid kpmcore ldb libadwaita libarchive libass libcheese libgtk-4 libgtkmm-4 libgtksourceview5 libheif libpng libportal libportal-gtk4 libreoffice-common librsvg libsodium libtiff libtool libvte libwebkit-gtk41 libwebkit-gtk6 lzo mesalib miniupnpc nautilus-extension nemo network-manager networkmanager-openconnect openconnect pipewire pipewire-lib pixman poppler poppler-utils postgresql-libpq python-pysmbc qt6-base qt6-declarative qt6-multimedia qt6-quick3d qt6-quicktimeline qt6-wayland rav1e rhythmbox samba sdl2 svt-av1 thunderbird wayland xapp xmlsec1 xorg-server xorg-xwayland xreader xviewer zenity Total size of package(s): 1.94 GB Downloading 1 / 111 Package ldb found in repository Solus ldb-2.8.2-31-1-x86_64.eopkg (137.0 KB)100% 0.00 --/- [--:--:--] [complete] (...) Package 0ad-data found in repository Solus 0ad-data-0.0.26a-10-1-x86_64.eopkg (1.4 GB) 39% (...)
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo eopkg --no-color upgrade --yes-all
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo eopkg --no-color upgrade --yes-all xz Updating repositories Updating repository: Solus eopkg-index.xml.xz.sha1sum (40.0 B)100% 0.00 --/- [--:--:--] [complete] Solus repository information is up-to-date. Warning: Safety switch forces the installation of following packages: os-release Warning: Safety switch forces the upgrade of following packages: bash bash-completion brotli eopkg gawk glib2 glibc gobject-introspection hwdata json-c libcap2 libdw libelf libjson-glib libnspr libnss libpipeline libssh2 libunistring lvm2 lzip ncurses nghttp2 nghttp3 pisi readline sqlite3 systemd wireless-regdb xz Total size of package(s): 55.40 MB Warning: There are extra packages due to dependencies. Downloading 1 / 32 Package ncurses found in repository Solus ncurses-6.5.20241006-29-1-x86_64.eopkg (767.0 KB)100% 0.00 --/- [--:--:--] [complete] (...) [✓] Syncing filesystems success [✓] Updating dynamic library cache success [ ] Updating clr-boot-manager skipped [ ] Updating clr-boot-manager skipped [ ] Updating clr-boot-manager skipped [ ] Updating clr-boot-manager skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [✓] Updating hwdb success [✓] Updating system users success [✓] Updating systemd tmpfiles success [✓] Reloading systemd configuration success [ ] Re-starting vendor-enabled .socket units skipped [ ] Re-executing systemd skipped [✓] Compiling glib-schemas success [✓] Creating GIO modules cache success [✓] Updating manpages database success [✓] Reloading udev rules success [✓] Applying udev rules success
- remove(package_id)[source]¶
Remove one package.
$ sudo eopkg --no-color remove --yes-all firefox The following list of packages will be removed in the respective order to satisfy dependencies: firefox Removing package firefox Rebuilding the FilesDB... Adding packages to FilesDB /var/lib/eopkg/info/files.db: ................ 847 packages added in total. Done rebuilding FilesDB (version: 3) Removed firefox [✓] Syncing filesystems success [✓] Updating dynamic library cache success [ ] Updating clr-boot-manager skipped [ ] Updating clr-boot-manager skipped [ ] Updating clr-boot-manager skipped [ ] Updating clr-boot-manager skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Registering QoL migration on next boot skipped [ ] Re-starting vendor-enabled .socket units skipped [ ] Re-executing systemd skipped [✓] Updating icon theme cache: hicolor success [✓] Updating desktop database success [✓] Updating manpages database success
- Return type:
- sync()[source]¶
Sync package metadata.
$ sudo --no-color eopkg update-repo Updating repository: Solus eopkg-index.xml.xz.sha1sum (40.0 B)100% 0.00 --/- [--:--:--] [complete] eopkg-index.xml.xz (3.1 MB)100% 87.40 KB/s [00:00:34] [complete] Package database updated.
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore: - orphaned packages, - outdated package locks - package cache and package manager cache
$ sudo eopkg --no-color remove-orphans --yes-all $ sudo eopkg --no-color clean $ sudo eopkg --no-color delete-cache
- Return type:
- cli_names: tuple[str, ...] = ('eopkg',)¶
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 = 'eopkg'¶
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.
meta_package_manager.managers.flatpak module¶
- class meta_package_manager.managers.flatpak.Flatpak[source]¶
Bases:
PackageManagerFlatpak package manager.
Note
All operations target the system-wide scope except
cleanupwhich only repairs the user installation. Per-scope targeting (system vs user) is tracked in #1725.Initialize
cli_errorslist.- homepage_url: str | None = 'https://flatpak.org'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.2.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, ...] = ('Flatpak\\s+(?P<version>\\S+)',)¶
$ flatpak --version Flatpak 1.4.2
- property installed: Iterator[Package]¶
Fetch installed packages.
$ flatpak list --app --columns=name,application,version > --ostree-verbose Name Application ID Version Peek com.uploadedlobster.peek 1.3.1 Fragments de.haeckerfelix.Fragments 1.4 GNOME MPV io.github.GnomeMpv 0.16 Syncthing GTK me.kozec.syncthingtk v0.9.4.3 Builder org.flatpak.Builder
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ flatpak remote-ls --app --updates --columns=name,application,version --ostree-verbose GNOME Dictionary org.gnome.Dictionary 3.26.0 stable x86_64
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not support extended or exact matching. So we returns the best subset of results and let
meta_package_manager.base.PackageManager.refiltered_search()refine them.$ flatpak search gitg --ostree-verbose gitg GUI for git org.gnome.gitg 3.32.1 stable flathub
- install(package_id, version=None)[source]¶
Install one package.
$ flatpak install --noninteractive org.gnome.Dictionary
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ flatpak update --noninteractive
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ flatpak update --noninteractive org.gnome.Dictionary
- remove(package_id)[source]¶
Remove one package.
$ flatpak uninstall --noninteractive org.gnome.Dictionary
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
See: https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-repair
$ flatpak repair --user
- Return type:
- cli_names: tuple[str, ...] = ('flatpak',)¶
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 = 'flatpak'¶
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.
meta_package_manager.managers.fwupd module¶
- class meta_package_manager.managers.fwupd.FWUPD[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- name: str = 'Linux Vendor Firmware Service'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://fwupd.org'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({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='cloudlinux', name='CloudLinux OS'), Platform(id='debian', name='Debian'), 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='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='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='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.9.5'¶
Version 1.9.5 is the first supporting –json parameter for get-devices command.
- cli_names: tuple[str, ...] = ('fwupdmgr',)¶
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).
- version_regexes: tuple[str, ...] = ('compile\\s+org\\.freedesktop\\.fwupd\\s+(?P<version>\\S+)\\s+',)¶
$ fwupdmgr --version compile com.hughsie.libxmlb 0.3.18 compile com.hughsie.libjcat 0.2.0 compile org.freedesktop.fwupd 1.9.24 runtime org.freedesktop.fwupd-efi 1.4 compile org.freedesktop.gusb 0.4.8 runtime com.hughsie.libxmlb 0.3.x runtime org.freedesktop.gusb 0.4.8 runtime com.hughsie.libjcat 0.2.0 runtime org.freedesktop.fwupd 1.9.24 runtime org.kernel 6.8.0-48-generic
- property installed: Iterator[Package]¶
Fetch installed packages.
$ fwupdmgr --assume-yes --no-reboot-check --no-device-prompt get-devices --json | jq { "Devices": [ { "Name": "USB2.0 Hub", "DeviceId": "7622d5fdbf1d1e08138156da7d83bf693986ad16", "ParentDeviceId" : "b5540761dfe33d9abccd3bb21f1d725f9e69f541", "CompositeId" : "b5540761dfe33d9abccd3bb21f1d725f9e69f541", "InstanceIds": [ "USB\VID_17EF&PID_3080", "USB\VID_17EF&PID_3080&REV_5163", "USB\VID_17EF&PID_3080&HUB_20", "USB\VID_17EF&PID_3080&SPI_C220", "USB\VID_17EF&PID_3080&SPI_C220&REV_5163", "USB\VID_17EF&PID_3080&DEV_VL820Q7" ], "Guid": [ "8ee94f0e-9b44-596a-bdd9-6f90401664cc", "35199e34-cf82-5b09-9287-622d225056e4", "0987e3c9-b1ee-5763-ac6e-51329b034e4b", "163cea66-5a78-58af-80ba-21be960aae5c", "c7def18d-66ae-5531-924b-2020c3638181" ], "Summary": "USB 3.x hub", "Plugin": "vli", "Protocol" : "com.vli.usbhub", "Flags": [ "updatable", "registered", "can-verify", "can-verify-image", "dual-image", "self-recovery", "add-counterpart-guids", "unsigned-payload" ], "Vendor": "VIA Labs, Inc.", "VendorId" : "USB:0x17EF", "Version": "51.63", "VersionFormat" : "bcd", "VersionRaw": 20835, "Icons": [ "usb-hub" ], "InstallDuration" : 15, "Created": 1686048073 }, { "DeviceId" : "20de1d77d0d1787bc56ef62f7d05de49361e1e07", "InstanceIds" : [ "DRM\VEN_RHT&DEV_1234" ], "Guid" : [ "90b1437c-86da-5374-a9a7-ceca8b0afd5e" ], "Plugin" : "linux_display", "Flags" : [ "registered" ], "Created" : 1731659840 }, { "Name" : "UEFI dbx", "DeviceId" : "362301da643102b9f38477387e2193e57abaa590", "InstanceIds" : [ "UEFI\CRT_E1FFABB40A30D9EE750BDA8BAF36ACA304FF20526138129247576B3339C54537&ARCH_AA64", "UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503&ARCH_AA64" ], "Guid" : [ "a9b31b16-b184-560f-97cb-1aa25e418c7d", "67d35028-ca5b-5834-834a-f97380381082" ], "Summary" : "UEFI revocation database", "Plugin" : "uefi_dbx", "Protocol" : "org.uefi.dbx", "Flags" : [ "internal", "updatable", "supported", "registered", "needs-reboot", "usable-during-update", "only-version-upgrade", "signed-payload" ], "Checksums" : [ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ], "VendorId" : "UEFI:Linux Foundation", "Version" : "0", "VersionLowest" : "0", "VersionFormat" : "number", "Icons" : [ "computer" ], "InstallDuration" : 1, "Created" : 1731659840, "Releases" : [ { "AppstreamId" : "org.linuxfoundation.dbx.aa64.firmware", "ReleaseId" : "35289", "RemoteId" : "lvfs", "Name" : "Secure Boot dbx", "NameVariantSuffix" : "aa64", "Summary" : "UEFI Secure Boot Forbidden Signature Database", "Description" : "<p>Insecure versions of the Microsoft Windows boot manager affected by Black Lotus were added to the list of forbidden signatures due to a discovered security problem.This updates the dbx to the latest release from Microsoft.</p><p>Before installing the update, fwupd will check for any affected executables in the ESP and will refuse to update if it finds any boot binaries signed with any of the forbidden signatures.Applying this update may also cause some Windows install media to not start correctly.</p>", "Version" : "26", "Filename" : "DBXUpdate-20230509-aa64.cab", "Protocol" : "org.uefi.dbx", "Categories" : [ "X-Configuration", "X-System" ], "Issues" : [ "CVE-2022-21894" ], "Checksum" : [ "46a42362cd34c0d103cf534ca431508d24715e51", "3ff3f17a9e5d372e51503803f22294f32ca90d1fe570b0bef4088c3a542617e6" ], "License" : "LicenseRef-proprietary", "Size" : 4610, "Created" : 1683590400, "Locations" : [ "https://fwupd.org/downloads/3ff3f17a9e5d372e51503803f22294f32ca90d1fe570b0bef4088c3a542617e6-DBXUpdate-20230509-aa64.cab" ], "Uri" : "https://fwupd.org/downloads/3ff3f17a9e5d372e51503803f22294f32ca90d1fe570b0bef4088c3a542617e6-DBXUpdate-20230509-aa64.cab", "Homepage" : "https://uefi.org/revocationlistfile", "Vendor" : "Linux Foundation", "Flags" : [ "trusted-metadata", "is-upgrade" ], "InstallDuration" : 1 }, { "AppstreamId" : "org.linuxfoundation.dbx.aa64.firmware", "ReleaseId" : "28503", "RemoteId" : "lvfs", "Name" : "Secure Boot dbx", "NameVariantSuffix" : "aa64", "Summary" : "UEFI Secure Boot Forbidden Signature Database", "Description" : "<p>An insecure version of software from vmware has been added to the list of forbidden signatures due to a discovered security problem.This updates the dbx to the latest release from Microsoft.</p><p>Before installing the update, fwupd will check for any affected executables in the ESP and will refuse to update if it finds any boot binaries signed with any of the forbidden signatures.</p>", "Version" : "22", "Filename" : "DBXUpdate-20230314-aa64.cab", "Protocol" : "org.uefi.dbx", "Categories" : [ "X-Configuration", "X-System" ], "Issues" : [ "CVE-2023-28005" ], "Checksum" : [ "611e745638f05e9a11c2998cfba38f0bad651141", "533ce4ac028585925268d9e39079b71730a7abd94f611bc532707938d4271ad3" ], "License" : "LicenseRef-proprietary", "Size" : 4418, "Created" : 1678752000, "Locations" : [ "https://fwupd.org/downloads/533ce4ac028585925268d9e39079b71730a7abd94f611bc532707938d4271ad3-DBXUpdate-20230314-aa64.cab" ], "Uri" : "https://fwupd.org/downloads/533ce4ac028585925268d9e39079b71730a7abd94f611bc532707938d4271ad3-DBXUpdate-20230314-aa64.cab", "Homepage" : "https://uefi.org/revocationlistfile", "Vendor" : "Linux Foundation", "Flags" : [ "trusted-metadata", "is-upgrade" ], "InstallDuration" : 1 }, { "AppstreamId" : "org.linuxfoundation.dbx.aa64.firmware", "ReleaseId" : "15180", "RemoteId" : "lvfs", "Name" : "Secure Boot dbx", "NameVariantSuffix" : "aa64", "Summary" : "UEFI Secure Boot Forbidden Signature Database", "Description" : "<p>This updates the dbx to the latest release from Microsoft which adds insecure versions of grub and shim to the list of forbidden signatures due to multiple discovered security updates.</p>", "Version" : "21", "Filename" : "DBXUpdate-20220812-aa64.cab", "Protocol" : "org.uefi.dbx", "Categories" : [ "X-Configuration", "X-System" ], "Issues" : [ "CVE-2022-34303", "309662", "CVE-2022-34302", "CVE-2022-34301" ], "Checksum" : [ "4032a1d8734e6085f4a6e4bb26a038eb639603b9", "bf56092de6586604d2b41d5bb4c9b7787a07adde408fd4134a3f3606f7fda999" ], "License" : "LicenseRef-proprietary", "Size" : 4370, "Created" : 1595980800, "Locations" : [ "https://fwupd.org/downloads/bf56092de6586604d2b41d5bb4c9b7787a07adde408fd4134a3f3606f7fda999-DBXUpdate-20220812-aa64.cab" ], "Uri" : "https://fwupd.org/downloads/bf56092de6586604d2b41d5bb4c9b7787a07adde408fd4134a3f3606f7fda999-DBXUpdate-20220812-aa64.cab", "Homepage" : "https://uefi.org/revocationlistfile", "Vendor" : "Linux Foundation", "Flags" : [ "trusted-metadata", "is-upgrade" ], "InstallDuration" : 1 } ] }, { "Name" : "Virtio network device", "DeviceId" : "17076870bcf7a84a9c8e999d7e54e39b446032bb", "InstanceIds" : [ "PCI\VEN_1AF4&DEV_1000", "PCI\VEN_1AF4&DEV_1000&SUBSYS_1AF40001" ], "Guid" : [ "21c85fac-5270-576f-a84e-04969f8cf75a", "b93ef629-0df1-5505-9fee-6992b8b9abd8" ], "Plugin" : "optionrom", "Flags" : [ "internal", "registered", "can-verify", "can-verify-image" ], "Vendor" : "Red Hat, Inc.", "VendorId" : "PCI:0x1AF4", "Created" : 1731659840 } ] }
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ fwupdmgr --assume-yes --no-reboot-check --no-device-prompt get-updates --json | jq { "Devices" : [ { "Name" : "UEFI dbx", "DeviceId" : "362301da643102b9f38477387e2193e57abaa590", "InstanceIds" : [ "UEFI\CRT_E1FFABB40A30D9EE750BDA8BAF36ACA304FF20526138129247576B3339C54537&ARCH_AA64", "UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503&ARCH_AA64" ], "Guid" : [ "a9b31b16-b184-560f-97cb-1aa25e418c7d", "67d35028-ca5b-5834-834a-f97380381082" ], "Summary" : "UEFI revocation database", "Plugin" : "uefi_dbx", "Protocol" : "org.uefi.dbx", "Flags" : [ "internal", "updatable", "supported", "registered", "needs-reboot", "usable-during-update", "only-version-upgrade", "signed-payload" ], "Checksums" : [ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ], "VendorId" : "UEFI:Linux Foundation", "Version" : "0", "VersionLowest" : "0", "VersionFormat" : "number", "Icons" : [ "computer" ], "InstallDuration" : 1, "Created" : 1731659840, "Releases" : [ { "AppstreamId" : "org.linuxfoundation.dbx.aa64.firmware", "ReleaseId" : "35289", "RemoteId" : "lvfs", "Name" : "Secure Boot dbx", "NameVariantSuffix" : "aa64", "Summary" : "UEFI Secure Boot Forbidden Signature Database", "Description" : "<p>Insecure versions of the Microsoft Windows boot manager affected by Black Lotus were added to the list of forbidden signatures due to a discovered security problem.This updates the dbx to the latest release from Microsoft.</p><p>Before installing the update, fwupd will check for any affected executables in the ESP and will refuse to update if it finds any boot binaries signed with any of the forbidden signatures.Applying this update may also cause some Windows install media to not start correctly.</p>", "Version" : "26", "Filename" : "DBXUpdate-20230509-aa64.cab", "Protocol" : "org.uefi.dbx", "Categories" : [ "X-Configuration", "X-System" ], "Issues" : [ "CVE-2022-21894" ], "Checksum" : [ "46a42362cd34c0d103cf534ca431508d24715e51", "3ff3f17a9e5d372e51503803f22294f32ca90d1fe570b0bef4088c3a542617e6" ], "License" : "LicenseRef-proprietary", "Size" : 4610, "Created" : 1683590400, "Locations" : [ "https://fwupd.org/downloads/3ff3f17a9e5d372e51503803f22294f32ca90d1fe570b0bef4088c3a542617e6-DBXUpdate-20230509-aa64.cab" ], "Uri" : "https://fwupd.org/downloads/3ff3f17a9e5d372e51503803f22294f32ca90d1fe570b0bef4088c3a542617e6-DBXUpdate-20230509-aa64.cab", "Homepage" : "https://uefi.org/revocationlistfile", "Vendor" : "Linux Foundation", "Flags" : [ "trusted-metadata", "is-upgrade" ], "InstallDuration" : 1 }, { "AppstreamId" : "org.linuxfoundation.dbx.aa64.firmware", "ReleaseId" : "28503", "RemoteId" : "lvfs", "Name" : "Secure Boot dbx", "NameVariantSuffix" : "aa64", "Summary" : "UEFI Secure Boot Forbidden Signature Database", "Description" : "<p>An insecure version of software from vmware has been added to the list of forbidden signatures due to a discovered security problem.This updates the dbx to the latest release from Microsoft.</p><p>Before installing the update, fwupd will check for any affected executables in the ESP and will refuse to update if it finds any boot binaries signed with any of the forbidden signatures.</p>", "Version" : "22", "Filename" : "DBXUpdate-20230314-aa64.cab", "Protocol" : "org.uefi.dbx", "Categories" : [ "X-Configuration", "X-System" ], "Issues" : [ "CVE-2023-28005" ], "Checksum" : [ "611e745638f05e9a11c2998cfba38f0bad651141", "533ce4ac028585925268d9e39079b71730a7abd94f611bc532707938d4271ad3" ], "License" : "LicenseRef-proprietary", "Size" : 4418, "Created" : 1678752000, "Locations" : [ "https://fwupd.org/downloads/533ce4ac028585925268d9e39079b71730a7abd94f611bc532707938d4271ad3-DBXUpdate-20230314-aa64.cab" ], "Uri" : "https://fwupd.org/downloads/533ce4ac028585925268d9e39079b71730a7abd94f611bc532707938d4271ad3-DBXUpdate-20230314-aa64.cab", "Homepage" : "https://uefi.org/revocationlistfile", "Vendor" : "Linux Foundation", "Flags" : [ "trusted-metadata", "is-upgrade" ], "InstallDuration" : 1 }, { "AppstreamId" : "org.linuxfoundation.dbx.aa64.firmware", "ReleaseId" : "15180", "RemoteId" : "lvfs", "Name" : "Secure Boot dbx", "NameVariantSuffix" : "aa64", "Summary" : "UEFI Secure Boot Forbidden Signature Database", "Description" : "<p>This updates the dbx to the latest release from Microsoft which adds insecure versions of grub and shim to the list of forbidden signatures due to multiple discovered security updates.</p>", "Version" : "21", "Filename" : "DBXUpdate-20220812-aa64.cab", "Protocol" : "org.uefi.dbx", "Categories" : [ "X-Configuration", "X-System" ], "Issues" : [ "CVE-2022-34303", "309662", "CVE-2022-34302", "CVE-2022-34301" ], "Checksum" : [ "4032a1d8734e6085f4a6e4bb26a038eb639603b9", "bf56092de6586604d2b41d5bb4c9b7787a07adde408fd4134a3f3606f7fda999" ], "License" : "LicenseRef-proprietary", "Size" : 4370, "Created" : 1595980800, "Locations" : [ "https://fwupd.org/downloads/bf56092de6586604d2b41d5bb4c9b7787a07adde408fd4134a3f3606f7fda999-DBXUpdate-20220812-aa64.cab" ], "Uri" : "https://fwupd.org/downloads/bf56092de6586604d2b41d5bb4c9b7787a07adde408fd4134a3f3606f7fda999-DBXUpdate-20220812-aa64.cab", "Homepage" : "https://uefi.org/revocationlistfile", "Vendor" : "Linux Foundation", "Flags" : [ "trusted-metadata", "is-upgrade" ], "InstallDuration" : 1 } ] } ] }
- install(package_id, version=None)[source]¶
Install one package.
$ sudo fwupdmgr --assume-yes --no-reboot-check --no-device-prompt install 362301da643102b9f38477387e2193e57abaa590 WARNING: UEFI capsule updates not available or enabled in firmware setup See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported for more information. 0. Cancel 1. 26 2. 22 3. 21 Choose release [0-3]: 3 Scheduling… [***************************************] Successfully installed firmware $ sudo fwupdmgr --assume-yes --no-reboot-check --no-device-prompt install 362301da643102b9f38477387e2193e57abaa590 21 WARNING: UEFI capsule updates not available or enabled in firmware setup See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported for more information. Scheduling… [***************************************] 362301da643102b9f38477387e2193e57abaa590 is already scheduled to be updated
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo fwupdmgr --assume-yes --no-reboot-check --no-device-prompt update
- id: str = 'fwupd'¶
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.
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade the package provided as parameter.
$ sudo fwupdmgr --assume-yes --no-reboot-check --no-device-prompt update 362301da643102b9f38477387e2193e57abaa590 WARNING: UEFI capsule updates not available or enabled in firmware setup See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported for more information. Scheduling… [ - ] 362301da643102b9f38477387e2193e57abaa590 is already scheduled to be updated
meta_package_manager.managers.gem module¶
- class meta_package_manager.managers.gem.Gem[source]¶
Bases:
PackageManagerThe RubyGems package manager.
Note
All operations target the default gem scope (controlled by
GEM_HOME). On system Ruby this means system-level gems, which may require elevated privileges for write operations. Per-scope targeting (system vs user gems) is tracked in #1725...tip:
Installs require ``sudo`` on system ruby. I (@tresni) recommend doing something like: .. code-block:: shell-session $ sudo dseditgroup -o edit -a -t user wheel And then do ``visudo`` to make it so the ``wheel`` group does not require a password. There is a line already there for it, you just need to uncomment it and save.Initialize
cli_errorslist.- name: str = 'Ruby Gems'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://rubygems.org'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- post_args: tuple[str, ...] = ('--quiet',)¶
Global list of options used before and after the invoked package manager CLI.
Automatically added to each
meta_package_manager.base.PackageManager.run_cli()call.Essentially used to force silencing, low verbosity or no-color output.
- property installed: Iterator[Package]¶
Fetch installed packages.
$ gem list --quiet bigdecimal (default: 1.4.1) bundler (default: 1.17.2) CFPropertyList (2.3.6) cmath (default: 1.0.0) csv (default: 3.0.9) date (default: 2.0.0) fileutils (1.4.1, default: 1.1.0) io-console (0.5.6, default: 0.4.7) ipaddr (default: 1.2.2) molinillo (0.5.4, 0.4.5, 0.2.3) nokogiri (1.5.6) psych (2.0.0) rake (0.9.6) rdoc (4.0.0) sqlite3 (1.3.7) test-unit (2.0.0.0)
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ gem outdated --quiet did_you_mean (1.0.0 < 1.0.2) io-console (0.4.5 < 0.4.6) json (1.8.3 < 2.0.1) minitest (5.8.3 < 5.9.0) power_assert (0.2.6 < 0.3.0) psych (2.0.17 < 2.1.0)
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not supports extended mode.
$ gem search python --versions --quiet at_coder_friends-generator-python_ref (0.2.0) bee_python (0.2.3) dependabot-python (0.117.5) logstash-filter-python (0.0.1 java) python (0.0.1) python-generator (1.1.0) python_with_git_test (2.499.8) rabbit-slide-niku-erlangvm-for-pythonista (2015.09.12) RubyToPython (0.0)
$ gem search python --versions --exact --quiet python (0.0.1)
- install(package_id, version=None)[source]¶
Install one package.
$ gem install --quiet markdown Fetching kramdown-2.3.1.gem Fetching concurrent-ruby-1.1.9.gem (...) Fetching rubyzip-2.3.2.gem Fetching logutils-0.6.1.gem Fetching markdown-1.2.0.gem Successfully installed kramdown-2.3.1 Successfully installed rubyzip-2.3.2 (...) Successfully installed markdown-1.2.0 (...) Parsing documentation for markdown-1.2.0 Installing ri documentation for markdown-1.2.0 Done installing documentation for (...) markdown after 19 seconds 12 gems installed
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ gem update --quiet
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ gem update --quiet markdown
- remove(package_id)[source]¶
Remove one package.
$ gem uninstall left-pad Successfully uninstalled left-pad-1.1.0
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
$ gem cleanup --quiet Cleaning up installed gems... Attempting to uninstall test-unit-3.2.9 Unable to uninstall test-unit-3.2.9: Gem::FilePermissionError: You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory. Attempting to uninstall did_you_mean-1.3.0 Unable to uninstall did_you_mean-1.3.0: Gem::FilePermissionError: You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory. Clean up complete
- Return type:
- cli_names: tuple[str, ...] = ('gem',)¶
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 = 'gem'¶
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.
meta_package_manager.managers.guix module¶
- class meta_package_manager.managers.guix.Guix[source]¶
Bases:
PackageManagerGNU Guix functional package manager.
Note
All operations target the current user’s default profile. Declarative system configuration (Guix System
config.scm) is not covered.Initialize
cli_errorslist.- homepage_url: str | None = 'https://guix.gnu.org'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({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='cloudlinux', name='CloudLinux OS'), Platform(id='debian', name='Debian'), 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='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='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='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.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, ...] = ('guix \\(GNU Guix\\) (?P<version>\\S+)',)¶
$ guix --version guix (GNU Guix) 1.4.0
- property installed: Iterator[Package]¶
Fetch installed packages.
Output is tab-separated: name, version, output, store path.
$ guix package --list-installed hello 2.10 out /gnu/store/...-hello-2.10 python 3.10.7 out /gnu/store/...-python-3.10.7
- property outdated: Iterator[Package]¶
Fetch outdated packages.
Relies on
guix upgrade --dry-runwhich lists every package that would be upgraded without modifying the user profile.$ guix upgrade --dry-run The following packages would be upgraded: hello 2.12.1 → 2.12.3 sed 4.8 → 4.9
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not support extended or exact matching. So we return the best subset of results and let
meta_package_manager.base.PackageManager.refiltered_search()refine them.Results are printed in recutils format with records separated by blank lines.
$ guix search hello name: hello version: 2.10 outputs: out systems: x86_64-linux i686-linux dependencies: glibc@2.35 ... location: gnu/packages/base.scm:86:2 homepage: https://www.gnu.org/software/hello/ license: GPL 3+ synopsis: Hello, GNU world: an example GNU package description: GNU Hello prints the message "Hello, world!" + and then exits. It serves as an example of standard + GNU coding practices. relevance: 10
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade one package.
$ guix upgrade hello
- cli_names: tuple[str, ...] = ('guix',)¶
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 = 'guix'¶
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.
meta_package_manager.managers.homebrew module¶
- class meta_package_manager.managers.homebrew.Homebrew[source]¶
Bases:
PackageManagerVirtual package manager shared by brew and cask CLI defined below.
Homebrew is the umbrella project providing both brew and brew cask commands.
Initialize
cli_errorslist.- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({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='cloudlinux', name='CloudLinux OS'), Platform(id='debian', name='Debian'), 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='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='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='tumbleweed', name='openSUSE Tumbleweed'), 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')})¶
Homebrew core is now compatible with Linux and Windows Subsystem for Linux (WSL) 2.
- requirement: str | None = '>=2.7.0'¶
Vanilla
brewandcaskCLIs now shares the same version.2.7.0 is the first release to enforce the use of
--caskoption.
- virtual: bool = True¶
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.
- extra_env: ClassVar = {'HOMEBREW_NO_ANALYTICS': '1', 'HOMEBREW_NO_AUTO_UPDATE': '1', 'HOMEBREW_NO_ENV_HINTS': '1'}¶
Additional environment variables to add to the current context.
Automatically applied on each
meta_package_manager.base.PackageManager.run_cli()calls.
- version_regexes: tuple[str, ...] = ('Homebrew\\s+(?P<version>\\S+)',)¶
$ brew --version Homebrew 1.8.6-124-g6cd4c31 Homebrew/homebrew-core (git revision 533d; last commit 2018-12-28) Homebrew/homebrew-cask (git revision 5095b; last commit 2018-12-28)
- property installed: Iterator[Package]¶
Fetch installed packages.
$ brew list --versions --formula ack 2.14 apg 2.2.3 audacity (!) 2.1.2 apple-gcc42 4.2.1-5666.3 atk 2.22.0 bash 4.4.5 bash-completion 1.3_1 boost 1.63.0 c-ares 1.12.0 graphviz 2.40.1 2.40.20161221.0239 quicklook-json latest
$ brew list --versions --cask aerial 1.2beta5 android-file-transfer latest audacity (!) 2.1.2 firefox 49.0.1 flux 37.7 gimp 2.8.18-x86_64 java 1.8.0_112-b16 tunnelblick 3.6.8_build_4625 3.6.9_build_4685 virtualbox 5.1.8-111374 5.1.10-112026
Todo
Use the
removedvariable to detect removed packages (which are reported with a(!)flag). See: https://github.com/caskroom/homebrew-cask/blob/master/doc /reporting_bugs/uninstall_wrongly_reports_cask_as_not_installed.md and https://github.com/kdeldycke/meta-package-manager/issues/17 .
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ brew outdated --json=v2 --formula | jq { "formulae": [ { "name": "pygobject3", "installed_versions": [ "3.36.1" ], "current_version": "3.38.0", "pinned": false, "pinned_version": null }, { "name": "rav1e", "installed_versions": [ "0.3.3" ], "current_version": "0.3.4", "pinned": false, "pinned_version": null } ], "casks": [] }
$ brew outdated --json=v2 --cask | jq { "formulae": [], "casks": [ { "name": "electrum", "installed_versions": "4.0.2", "current_version": "4.0.3" }, { "name": "qlcolorcode", "installed_versions": "3.0.2", "current_version": "3.1.1" } ] }
$ brew outdated --json=v2 --greedy --cask | jq { "formulae": [], "casks": [ { "name": "amethyst", "installed_versions": "0.14.3", "current_version": "0.15.3" }, { "name": "balenaetcher", "installed_versions": "1.5.106", "current_version": "1.5.108" }, { "name": "caldigit-thunderbolt-charging", "installed_versions": "latest", "current_version": "latest" }, { "name": "electrum", "installed_versions": "4.0.2", "current_version": "4.0.3" }, { "name": "lg-onscreen-control", "installed_versions": "5.33,cV8xqv5TSZA.upgrading, 5.47,yi5XuIZw6hg", "current_version": "5.48,uYXSwyUCNFBbSch9PFw" } ] }
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not supports extended mode.
$ brew search sed ==> Formulae gnu-sed ✔ libxdg-basedir ==> Casks eclipse-dsl marsedit focused physicseditor google-adwords-editor prefs-editor licensed subclassed-mnemosyne
$ brew search sed --formulae ==> Formulae gnu-sed ✔ libxdg-basedir
$ brew search sed --cask ==> Casks eclipse-dsl marsedit focused physicseditor google-adwords-editor prefs-editor licensed subclassed-mnemosyne
$ brew search python --formulae ==> Formulae app-engine-python boost-python3 python ✔ python-yq boost-python gst-python python-markdown python@3.8 ✔
$ brew search "/^ssed$/" --formulae ==> Formulae ssed
$ brew search "/^sed$/" --formulae Error: No formula or cask found for "/^sed$/".
$ brew search tetris --formulae --desc ==> Formulae bastet: Bastard Tetris netris: Networked variant of tetris vitetris: Terminal-based Tetris clone yetris: Customizable Tetris for the terminal
$ brew search tetris --cask --desc ==> Casks not-tetris: (Not Tetris) [no description] tetrio: (TETR.IO) Free-to-play Tetris clone
More doc at: https://docs.brew.sh/Manpage#search–s-options-textregex-
- install(package_id, version=None)[source]¶
Install one package.
$ brew install jpeginfo --formula ==> Downloading https://ghcr.io/core/jpeginfo/manifests/1.6.1_1-1 ############################################################## 100.0% ==> Downloading https://ghcr.io/core/jpeginfo/blobs/sha256:27bb35884368b83 ==> Downloading from https://pkg.githubcontent.com/ghcr1/blobs/sha256:27bb3 ############################################################## 100.0% ==> Pouring jpeginfo--1.6.1_1.big_sure.bottle.1.tar.gz 🍺 /usr/local/Cellar/jpeginfo/1.6.1_1: 7 files, 77.6KB
$ brew install pngyu --cask ==> Downloading https://nukesaq.github.io/Pngyu/download/Pngyu_mac_101.zip ################################################################## 100.0% ==> Installing Cask pngyu ==> Moving App 'Pngyu.app' to '/Applications/Pngyu.app' 🍺 pngyu was successfully installed!
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
brewandcaskshare the same command.$ brew upgrade --formula ==> Upgrading 2 outdated packages: node 13.11.0 -> 13.12.0 sdl2 2.0.12 -> 2.0.12_1 ==> Upgrading node 13.11.0 -> 13.12.0 ==> Downloading https://homebrew.bintray.com/bottles/node-13.tar.gz ==> Downloading from https://akamai.bintray.com/fc/fc0bfb42fe23e960 ############################################################ 100.0% ==> Pouring node-13.12.0.catalina.bottle.tar.gz ==> Caveats Bash completion has been installed to: /usr/local/etc/bash_completion.d ==> Summary 🍺 /usr/local/Cellar/node/13.12.0: 4,660 files, 60.3MB Removing: /usr/local/Cellar/node/13.11.0... (4,686 files, 60.4MB) ==> Upgrading sdl2 2.0.12 -> 2.0.12_1 ==> Downloading https://homebrew.bintray.com/bottles/sdl2-2.tar.gz ==> Downloading from https://akamai.bintray.com/4d/4dcd635465d16372 ############################################################ 100.0% ==> Pouring sdl2-2.0.12_1.catalina.bottle.tar.gz 🍺 /usr/local/Cellar/sdl2/2.0.12_1: 89 files, 4.7MB Removing: /usr/local/Cellar/sdl2/2.0.12... (89 files, 4.7MB) ==> Checking for dependents of upgraded formulae... ==> No dependents found! ==> Caveats ==> node Bash completion has been installed to: /usr/local/etc/bash_completion.d
$ brew upgrade --cask ==> Casks with `auto_updates` or `version :latest` will not be upgraded ==> Upgrading 1 outdated packages: aerial 2.0.7 -> 2.0.8 ==> Upgrading aerial ==> Downloading https://github.com/Aerial/download/v2.0.8/Aerial.saver.zip ==> Downloading from https://65be.s3.amazonaws.com/44998092/29eb1e0 ==> Verifying SHA-256 checksum for Cask 'aerial'. ==> Backing Screen Saver up to '/usr/local/Caskroom/Aerial.saver'. ==> Removing Screen Saver '/Users/kde/Library/Screen Savers/Aerial.saver'. ==> Moving Screen Saver to '/Users/kde/Library/Screen Savers/Aerial.saver'. ==> Purging files for version 2.0.7 of Cask aerial 🍺 aerial was successfully upgraded!
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
brewandcaskshare the same command.$ brew upgrade dupeguru --cask ==> Upgrading 1 outdated package: dupeguru 4.2.0 -> 4.2.1 ==> Upgrading dupeguru ==> Downloading https://github.com/(...)/4.2.1/dupeguru_macOS_Qt_4.2.1.zip ==> Downloading from https://githubusercontent.com/production-release-asset ##################################################################### 100.0% ==> Backing App 'dupeguru.app' up to '/opt/homebrew/.../4.2.0/dupeguru.app' ==> Removing App '/Applications/dupeguru.app' ==> Moving App 'dupeguru.app' to '/Applications/dupeguru.app' ==> Purging files for version 4.2.0 of Cask dupeguru 🍺 dupeguru was successfully upgraded!
- remove(package_id)[source]¶
Removes a package.
$ brew uninstall bat Uninstalling /usr/local/Cellar/bat/0.21.0... (14 files, 5MB)
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
Scrub the cache, including latest version’s downloads. Also remove unused dependencies.
Downloads for all installed formulae and casks will not be deleted.
$ brew cleanup -s --prune=all Removing: ~/Library/Caches/Homebrew/node--1.bottle.tar.gz... (9MB) Warning: Skipping sdl2: most recent version 2.0.12_1 not installed Removing: ~/Library/Caches/Homebrew/Cask/aerial--1.8.1.zip... (5MB) Removing: ~/Library/Caches/Homebrew/Cask/prey--1.9.pkg... (19.9MB) Removing: ~/Library/Logs/Homebrew/readline... (64B) Removing: ~/Library/Logs/Homebrew/libfido2... (64B) Removing: ~/Library/Logs/Homebrew/libcbor... (64B)
More doc at: https://docs.brew.sh/Manpage#cleanup-options-formulacask
$ brew autoremove ==> Uninstalling 17 unneeded formulae: gtkmm3 highlight lua@5.1 nasm nghttp2 texi2html Uninstalling /usr/local/Cellar/nghttp2/1.41.0_1... (26 files, 2.7MB) Uninstalling /usr/local/Cellar/highlight/3.59... (558 files, 3.5MB) Warning: The following highlight configuration files have not been removed! If desired, remove them manually with `rm -rf`: /usr/local/etc/highlight /usr/local/etc/highlight/filetypes.conf /usr/local/etc/highlight/filetypes.conf.default Uninstalling /usr/local/Cellar/gtkmm3/3.24.2_1... (1,903 files, 173.7MB) Uninstalling /usr/local/Cellar/texi2html/5.0... (279 files, 6.2MB) Uninstalling /usr/local/Cellar/lua@5.1/5.1.5_8... (22 files, 245.6KB) Uninstalling /usr/local/Cellar/nasm/2.15.05... (29 files, 2.9MB)
- Return type:
- cli_names: tuple[str, ...] = ('homebrew',)¶
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.homebrew.Brew[source]¶
Bases:
HomebrewInitialize
cli_errorslist.- name: str = 'Homebrew Formulae'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://brew.sh'¶
Home page of the project, only used in documentation for reference.
- cli_names: tuple[str, ...] = ('brew',)¶
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).
- post_args: tuple[str, ...] = ('--formula',)¶
Global list of options used before and after the invoked package manager CLI.
Automatically added to each
meta_package_manager.base.PackageManager.run_cli()call.Essentially used to force silencing, low verbosity or no-color output.
- class meta_package_manager.managers.homebrew.Cask[source]¶
Bases:
HomebrewInitialize
cli_errorslist.- name: str = 'Homebrew Cask'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/Homebrew/homebrew-cask'¶
Home page of the project, only used in documentation for reference.
- id: str = 'cask'¶
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.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='macos', name='macOS')})¶
Casks are only available on macOS, not Linux or WSL.
- cli_names: tuple[str, ...] = ('brew',)¶
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).
- post_args: tuple[str, ...] = ('--cask',)¶
Global list of options used before and after the invoked package manager CLI.
Automatically added to each
meta_package_manager.base.PackageManager.run_cli()call.Essentially used to force silencing, low verbosity or no-color output.
meta_package_manager.managers.macports module¶
- class meta_package_manager.managers.macports.MacPorts[source]¶
Bases:
PackageManagerMacPorts package manager for macOS.
Note
MacPorts installs into
/opt/localby default and requires root privileges for mutating operations. Theportbinary is located at/opt/local/bin/port.Initialize
cli_errorslist.- homepage_url: str | None = 'https://www.macports.org'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='macos', name='macOS')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=2.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.
- cli_names: tuple[str, ...] = ('port',)¶
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).
- cli_search_path: tuple[str, ...] = ('/opt/local/bin',)¶
List of additional path to help mpm hunt down the package manager CLI.
Must be a list of strings whose order dictates the search sequence.
Most of the time unnecessary:
meta_package_manager.base.PackageManager.cli_path()works well on all platforms.
- version_cli_options: tuple[str, ...] = ('version',)¶
CLI options used to produce the version of the package manager.
The raw output produced by the package manager CLI will be parsed with the
version_regexesbelow to extract the version number.
- version_regexes: tuple[str, ...] = ('Version:\\s+(?P<version>\\S+)',)¶
$ port version Version: 2.12.4
- property installed: Iterator[Package]¶
Fetch installed packages.
Only active ports are returned. Inactive ports (old versions kept by MacPorts) are skipped.
$ port -q installed curl @8.7.1_0 (active) python312 @3.12.3_0+lzma+optimizations (active) vim @9.1.0_0 (active)
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ port -q outdated curl 8.7.1_0 < 8.8.0_0 python312 3.12.3_0 < 3.12.4_0
- search(query, extended, exact)[source]¶
Fetch matching packages.
$ port search --name --line vim MacVim 9.1.1092 aqua MacVim - VIM for macOS vim 9.1.1092 editors Vi IMproved
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade one package.
$ port upgrade vim
- cleanup()[source]¶
Remove work directories, distfiles, and logs for installed ports.
$ port clean --all installed
- Return type:
- id: str = 'macports'¶
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.
meta_package_manager.managers.mas module¶
- class meta_package_manager.managers.mas.MAS[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- name: str = 'Mac AppStore'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/argon/mas'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='macos', name='macOS')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a frozenset of
Platforminstances at instantiation.
- property installed: Iterator[Package]¶
Fetch installed packages.
$ mas list 1569813296 1Password for Safari (2.3.5) 1295203466 Microsoft Remote Desktop (10.7.6) 409183694 Keynote (12.0) 1408727408 com.adriangranados.wifiexplorerlite (1.5.5) 409203825 Numbers (12.0)
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ mas outdated 409183694 Keynote (11.0 -> 12.0) 1176895641 Spark (2.11.20 -> 2.11.21)
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not support extended or exact matching. So we returns the best subset of results and let
meta_package_manager.base.PackageManager.refiltered_search()refine them.$ mas search python 689176796 Python Runner (1.3) 630736088 Learning Python (1.0) 945397020 Run Python (1.0) 1164498373 PythonGames (1.0) 1400050251 Pythonic (1.0.0)
- install(package_id, version=None)[source]¶
Install one package.
$ mas install 945397020
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ mas upgrade
- cli_names: tuple[str, ...] = ('mas',)¶
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 = 'mas'¶
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.
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ mas upgrade 945397020
meta_package_manager.managers.npm module¶
- class meta_package_manager.managers.npm.NPM[source]¶
Bases:
PackageManagerSee command equivalences at: https://github.com/antfu-collective/ni?tab=readme-ov-file#ni.
Note
All operations target the global scope via
--global. Per-scope targeting and multi-binary discovery (e.g. multiple node versions via nvm) are tracked in #1725.Initialize
cli_errorslist.- name: str = "Node's npm"¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://www.npmjs.com'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- 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.
- pre_args: tuple[str, ...] = ('--global', '--no-progress', '--no-update-notifier', '--no-fund', '--no-audit')¶
$ npm --version 6.13.7
- run_cli(*args, **kwargs)[source]¶
Like the common run_cli helper, but silence NPM’s JSON output on error.
NPM is prone to breakage if local node version is not in sync:
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit --json outdated { "error": { "code": "ERR_OUT_OF_RANGE", "summary": "The value of "err" is out of range. Received 536870212", "detail": "" } }
- Return type:
- property installed: Iterator[Package]¶
Fetch installed packages.
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit --json --depth 0 list | jq { "name": "lib", "dependencies": { "@eslint/json": { "version": "0.9.0", "overridden": false }, "@mermaid-js/mermaid-cli": { "version": "10.8.0", "overridden": false }, "corepack": { "version": "0.30.0", "overridden": false }, "google-closure-compiler": { "version": "20240317.0.0", "overridden": false }, "npm": { "version": "10.9.2", "overridden": false }, "raven": { "version": "2.6.4", "overridden": false }, "wrangler": { "version": "3.51.2", "overridden": false } } }
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit --json outdated | jq { "my-linked-package": { "current": "0.0.0-development", "wanted": "linked", "latest": "linked", "location": "/Users/..." }, "npm": { "current": "3.10.3", "wanted": "3.10.5", "latest": "3.10.5", "location": "/opt/homebrew/lib/node_modules/npm" } }
- search(query, extended, exact)[source]¶
Fetch matching packages.
Doc: https://docs.npmjs.com/cli/search.html
Caution
Search does not supports exact matching.
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit search --json python | jq [ { "name": "python", "description": "Interact with a python child process", "maintainers": [ { "username": "drderidder", "email": "drderidder@gmail.com" } ], "version": "0.0.4", "date": "2015-01-25T02:48:07.820Z" }, { "name": "raven", "description": "A standalone (Node.js) client for Sentry", "maintainers": [ { "username": "benvinegar", "email": "ben@benv.ca" }, { "username": "lewisjellis", "email": "me@lewisjellis.com" }, { "username": "mattrobenolt", "email": "m@robenolt.com" }, { "username": "zeeg", "email": "dcramer@gmail.com" } ], "keywords": [ "raven", "sentry", "python", "errors", "debugging", "exceptions" ], "version": "1.1.2", "date": "2017-02-09T02:54:07.723Z" }, { "name": "brush-python", "description": "Python brush module for SyntaxHighlighter.", "maintainers": [ { "username": "alexgorbatchev", "email": "alex.gorbatchev@gmail.com" } ], "keywords": [ "syntaxhighlighter", "brush", "python" ], "version": "4.0.0", "date": "2016-02-07T21:32:39.597Z" }, (...) ]
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit search --json --no-description python | jq
- install(package_id, version=None)[source]¶
Install one package.
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit install markdown added 3 packages in 3s
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit upgrade
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade the package provided as parameter.
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit upgrade raven
- remove(package_id)[source]¶
Remove one package and one only.
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit uninstall raven
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
$ npm --global --no-progress --no-update-notifier --no-fund --no-audit cache clean --force
- Return type:
- cli_names: tuple[str, ...] = ('npm',)¶
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 = 'npm'¶
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.
meta_package_manager.managers.opkg module¶
- class meta_package_manager.managers.opkg.OPKG[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- homepage_url: str | None = 'https://git.yoctoproject.org/cgit/cgit.cgi/opkg/'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=0.2.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, ...] = ('opkg\\s+version\\s+(?P<version>\\S+)',)¶
$ opkg --version opkg version 0.3.6 (libsolv 0.7.5)
- property installed: Iterator[Package]¶
Fetch installed packages.
$ opkg list-installed 3rd-party-feed-configs - 1.1-r0 aio-grab - 1.0+git71+c79e264-r0 alsa-conf - 1.1.9-r0 alsa-state - 0.2.0-r5 alsa-states - 0.2.0-r5 alsa-utils-alsactl - 1.1.9-r0 avahi-daemon - 0.7-r0 base-files - 3.0.14-r89 base-files-dev - 3.0.14-r89 base-passwd - 3.5.29-r0 bash - 5.0-r0 bash-completion - 2.9-r0 bash-completion-dev - 2.9-r0 bash-dev - 5.0-r0 binutils - 2.32.0-r0 busybox - 1.31.0-r0 busybox-inetd - 1.31.0-r0 busybox-mdev - 1.31.0-r0 busybox-syslog - 1.31.0-r0 busybox-udhcpc - 1.31.0-r0
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ opkg list-upgradable openpli-bootlogo - 20190717-r0 - 20190718-r0 enigma2-hotplug - 2.7+git1720+55c6b34-r0 - 2.7+git1722+daf2f52-r0
- search(query, extended, exact)[source]¶
Fetch matching packages.
Warning
There is no search command so we simulate it by listing all packages.
Caution
Search does not support extended or exact matching. So we returns the best subset of results and let
meta_package_manager.base.PackageManager.refiltered_search()refine them.$ opkg list
- install(package_id, version=None)[source]¶
Install one package.
$ opkg install enigma2-hotplug
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ opkg upgrade
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ opkg upgrade enigma2-hotplug
- cli_names: tuple[str, ...] = ('opkg',)¶
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 = 'opkg'¶
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.
meta_package_manager.managers.pacman module¶
- class meta_package_manager.managers.pacman.Pacman[source]¶
Bases:
PackageManagerSee command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta.
Initialize
cli_errorslist.- homepage_url: str | None = 'https://wiki.archlinux.org/title/pacman'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- 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 ``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 --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
- 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 --sync firefox
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade the package provided as parameter.
$ sudo pacman --noconfirm --sync --refresh --sysupgrade
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade the package provided as parameter.
$ sudo pacman --noconfirm --sync firefox
- remove(package_id)[source]¶
Removes a package.
$ sudo pacman --noconfirm --remove firefox
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
$ sudo pacman --noconfirm --sync --clean --clean
- Return type:
- 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).
- 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.
- class meta_package_manager.managers.pacman.Pacaur[source]¶
Bases:
PacmanPacaurwrapspacmanand shadows its options.Initialize
cli_errorslist.- homepage_url: str | None = 'https://github.com/E5ten/pacaur'¶
Home page of the project, only used in documentation for reference.
- 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).
- 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.
- class meta_package_manager.managers.pacman.Paru[source]¶
Bases:
Pacmanparuwrapspacmanand shadows its options.Initialize
cli_errorslist.- homepage_url: str | None = 'https://github.com/Morganamilo/paru'¶
Home page of the project, only used in documentation for reference.
- 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
- 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).
- 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.
- class meta_package_manager.managers.pacman.Yay[source]¶
Bases:
Pacmanyaywrapspacmanand shadows its options.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).
- homepage_url: str | None = 'https://github.com/Jguer/yay'¶
Home page of the project, only used in documentation for reference.
- 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.
- 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.
meta_package_manager.managers.pip module¶
- class meta_package_manager.managers.pip.Pip[source]¶
Bases:
PackageManagerWe will use the Python binary to call out
pipas a module instead of a CLI.This is a more robust way of managing packages: “if you’re on Windows there is an added benefit to using python -m pip as it lets pip update itself.” Source: https://snarky.ca/why-you-should-use-python-m-pip/
Note
All operations target the default pip scope (system site-packages, or the active virtualenv). Per-scope targeting (system vs user vs venv) and multi-binary discovery (e.g. multiple pythons via pyenv) are tracked in #1725.
Initialize
cli_errorslist.- homepage_url: str | None = 'https://pip.pypa.io'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=10.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.
- cli_names: tuple[str, ...] = ('python3', 'python')¶
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).
- version_cli_options: tuple[str, ...] = ('-m', 'pip', '--no-color', '--version')¶
CLI options used to produce the version of the package manager.
The raw output produced by the package manager CLI will be parsed with the
version_regexesbelow to extract the version number.
- version_regexes: tuple[str, ...] = ('pip\\s+(?P<version>\\S+)',)¶
$ python -m pip --no-color --version pip 2.0.2 from /usr/local/lib/python/site-packages/pip (python 3.7)
- search_all_cli(cli_names, env=None)[source]¶
Prepend the current Python executable to the list of found binaries.
Todo
Evaluate pythonfinder to replace our custom search logic.
- property version: TokenizedString | None¶
Print Python’s own version before Pip’s.
This gives much more context to the user about the environment when a Python executable is found but Pip is not.
Runs:
- property installed: Iterator[Package]¶
Fetch installed packages.
$ python -m pip --no-color list --format=json --verbose --quiet > | jq [ { "version": "1.3", "name": "backports.functools-lru-cache", "location": "/usr/local/lib/python3.7/site-packages", "installer": "pip" }, { "version": "0.9999999", "name": "html5lib", "location": "/usr/local/lib/python3.7/site-packages", "installer": "pip" }, { "name": "setuptools", "version": "46.0.0", "location": "/usr/local/lib/python3.7/site-packages", "installer": "" }, { "version": "2.8", "name": "Jinja2", "location": "/usr/local/lib/python3.7/site-packages", "installer": "" }, (...) ]
- property outdated: Iterator[Package]¶
Fetch outdated packages.
Note
The
--not-requiredflag filters out transitive dependencies, restricting results to top-level packages only. Upgrading transitive dependencies can break version constraints of their parent packages. See #1214.Caution
Results are additionally filtered against
meta-package-manager’s own dependency tree to suppress false positives caused by Homebrew’s per-resource installation layout. See_own_dependency_names()and #1767.$ python -m pip --no-color list --format=json --outdated > --not-required --verbose --quiet | jq [ { "latest_filetype": "wheel", "version": "0.7.9", "name": "alabaster", "latest_version": "0.7.10", "location": "/usr/local/lib/python3.7/site-packages", "installer": "pip" }, { "latest_filetype": "wheel", "version": "0.9999999", "name": "html5lib", "latest_version": "0.999999999", "location": "/usr/local/lib/python3.7/site-packages", "installer": "pip" }, { "latest_filetype": "wheel", "version": "2.8", "name": "Jinja2", "latest_version": "2.9.5", "location": "/usr/local/lib/python3.7/site-packages", "installer": "pip" }, { "latest_filetype": "wheel", "version": "0.5.3", "name": "mccabe", "latest_version": "0.6.1", "location": "/usr/local/lib/python3.7/site-packages", "installer": "pip" }, { "latest_filetype": "wheel", "version": "2.2.0", "name": "pycodestyle", "latest_version": "2.3.1", "location": "/usr/local/lib/python3.7/site-packages", "installer": "pip" }, { "latest_filetype": "wheel", "version": "2.1.3", "name": "Pygments", "latest_version": "2.2.0", "location": "/usr/local/lib/python3.7/site-packages", "installer": "" } ]
- search_xxx_disabled(query, extended, exact)[source]¶
Fetch matching packages.
Warning
That function was previously named
searchbut has been renamed to make it invisible from thempmframework, disabling search feature altogether forpip.This had to be done has Pip’s maintainers disabled the server-side API because of unmanageable high-load. See: https://github.com/pypa/pip/issues/5216#issuecomment-744605466
Caution
Search is extended by default. So we returns the best subset of results and let
meta_package_manager.base.PackageManager.refiltered_search()refine them$ python -m pip --no-color search abc ABC (0.0.0) - UNKNOWN micropython-abc (0.0.1) - Dummy abc module for MicroPython abc1 (1.2.0) - a list about my think abcd (0.3.0) - AeroGear Build Cli for Digger abcyui (1.0.0) - Sorry ,This is practice! astroabc (1.4.2) - A Python implementation of an Approximate Bayesian Computation Sequential Monte Carlo (ABC SMC) sampler for parameter estimation. collective.js.abcjs (1.10) - UNKNOWN cosmo (1.0.5) - Python ABC sampler
- install(package_id, version=None)[source]¶
Install one package.
$ python -m pip --no-color install arrow Collecting arrow Using cached arrow-1.1.1-py3-none-any.whl (60 kB) Collecting python-dateutil>=2.7.0 Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) Requirement already satisfied: six>=1.5 in python3.9/site-packages (1.16.0) Installing collected packages: python-dateutil, arrow Successfully installed arrow-1.1.1 python-dateutil-2.8.2
- Return type:
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade the package provided as parameter.
$ python -m pip --no-color install --upgrade six Collecting six Using cached six-1.15.0-py2.py3-none-any.whl (10 kB) Installing collected packages: six Attempting uninstall: six Found existing installation: six 1.14.0 Uninstalling six-1.14.0: Successfully uninstalled six-1.14.0 Successfully installed six-1.15.0
Note
Pip lacks support of a proper full upgrade command. Raising an error let the parent class upgrade packages one by one.
- remove(package_id)[source]¶
Remove one package.
$ python -m pip --no-color uninstall --yes arrow
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
$ python -m pip --no-color cache purge
- Return type:
- id: str = 'pip'¶
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.
meta_package_manager.managers.pipx module¶
- class meta_package_manager.managers.pipx.Pipx[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- homepage_url: str | None = 'https://pipx.pypa.io'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- property installed: Iterator[Package]¶
Fetch installed packages.
$ pipx list --json | jq { "pipx_spec_version": "0.1", "venvs": { "pycowsay": { "metadata": { "injected_packages": {}, "main_package": { "app_paths": [ { "__Path__": "~/.local/pipx/venvs/pycowsay/bin/pycowsay", "__type__": "Path" } ], "app_paths_of_dependencies": {}, "apps": [ "pycowsay" ], "apps_of_dependencies": [], "include_apps": true, "include_dependencies": false, "package": "pycowsay", "package_or_url": "pycowsay", "package_version": "0.0.0.1", "pip_args": [], "suffix": "" }, "pipx_metadata_version": "0.2", "python_version": "Python 3.10.4", "venv_args": [] } } } }
- property outdated: Iterator[Package]¶
Fetch outdated packages.
Todo
Mimics
Pip.outdated()operation. There probably is a way to factorize it.$ pipx runpip poetry list --no-color --format=json --outdated > --verbose --quiet | jq [ { "name": "charset-normalizer", "version": "2.0.12", "location": "~/.local/pipx/venvs/poetry/lib/python3.10/site-packages", "installer": "pip", "latest_version": "2.1.0", "latest_filetype": "wheel" }, { "name": "packaging", "version": "20.9", "location": "~/.local/pipx/venvs/poetry/lib/python3.10/site-packages", "installer": "pip", "latest_version": "21.3", "latest_filetype": "wheel" }, { "name": "virtualenv", "version": "20.14.1", "location": "~/.local/pipx/venvs/poetry/lib/python3.10/site-packages", "installer": "pip", "latest_version": "20.15.0", "latest_filetype": "wheel" } ]
- install(package_id, version=None)[source]¶
Install one package.
$ pipx install pycowsay installed package pycowsay 0.0.0.1, installed using Python 3.10.4 These apps are now globally available - pycowsay done! ✨ 🌟 ✨
- Return type:
- cli_names: tuple[str, ...] = ('pipx',)¶
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 = 'pipx'¶
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.
- remove(package_id)[source]¶
Remove one package.
$ pipx uninstall pycowsay uninstalled pycowsay! ✨ 🌟 ✨
- Return type:
meta_package_manager.managers.pkg module¶
FreeBSD package managers.
Two managers share this module because they share the FreeBSD ecosystem and the same on-disk install database:
PKGwraps the binarypkgfrontend, which fetches pre-compiled artifacts from the official FreeBSD repository.Portswraps the source-build workflow rooted at/usr/ports, driving make recipes directly and delegating registry queries back topkg.
References: - https://man.freebsd.org/cgi/man.cgi?pkg(8) - https://docs.freebsd.org/en/books/handbook/ports/ - https://man.freebsd.org/cgi/man.cgi?ports(7)
- meta_package_manager.managers.pkg.PORTS_TREE = PosixPath('/usr/ports')¶
Canonical location of the FreeBSD ports tree.
The Handbook documents this path as the convention;
PORTSDIRcan override it, but every tool and consumer in the wild assumes this default.
- class meta_package_manager.managers.pkg.PKG[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- name: str = 'FreeBSD System Manager'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://github.com/freebsd/pkg'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='freebsd', name='FreeBSD')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.11'¶
1.11 is the first version to support
IGNORE_OSVERSIONenvironment variable.
- property installed: Iterator[Package]¶
Fetch installed packages.
$ pkg query -e "%a = 0" "%n %v %c" 7-zip 21.07_2 Console version of the 7-Zip file archiver ap24-mod_mpm_itk 2.4.7_2 Run each vhost under a separate uid and gid apache24 2.4.57 Version 2.4.x of Apache web server aquantia-atlantic-kmod 0.0.5_1 Aquantia AQtion (Atlantic) Network Driver arcconf 3.07.23971,1 Adaptec SCSI/SAS RAID administration tool areca-cli-amd64 1.14.7.150519,1 Command Line Interface for ARC-xxxx RAID base64 1.5_1 Utility to encode and decode base64 files bash 5.1.12 GNU Project's Bourne Again SHell beadm 1.4_1 Solaris-like utility to manage Boot Environments on ZFS
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ pkg upgrade --dry-run Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking for upgrades (312 candidates): 100% Processing candidates (312 candidates): 100% The following 466 package(s) will be affected (of 0 checked): Installed packages to be REMOVED: freenas-files: 13.0_1700495253 py39-midcli: 20190509171453 py39-middlewared: 13.0_1700495253 New packages to be INSTALLED: abseil: 20230125.3 [FreeBSD] argp-standalone: 1.5.0 [FreeBSD] brotli: 1.1.0,1 [FreeBSD] Installed packages to be UPGRADED: 7-zip: 21.07_2 -> 23.01 [FreeBSD] apache24: 2.4.57 -> 2.4.58_1 [FreeBSD] apr: 1.7.0.1.6.1_1 -> 1.7.3.1.6.3_1 [FreeBSD] aquantia-atlantic-kmod: 0.0.5_1 -> 0.0.5_2 [FreeBSD] bash: 5.1.12 -> 5.2.21 [FreeBSD]
Note
We rely on
pkg upgradeinstead ofpkg versionbecause the latter does not provides the new version:$ pkg version --like "<" Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. 7-zip-21.07_2 < apache24-2.4.57 < apr-1.7.0.1.6.1_1 < aquantia-atlantic-kmod-0.0.5_1 < bash-5.1.12 <
- search(query, extended, exact)[source]¶
Fetch matching packages.
Default search on ID substring:
$ pkg search --raw --raw-format json-compact --search name nginx { "name": "nginx", "version": "1.24.0_14,3", "comment": "Robust and small WWW server", (...) } { "name": "nginx-devel", "version": "1.25.3_9", "comment": "Robust and small WWW server", (...) } { "name": "nginx-ultimate-bad-bot-blocker", "version": "4.2020.03.2005_1", "comment": "Nginx bad bot and other things blocker", (...) } { "name": "p5-Nginx-ReadBody", "version": "0.07_1", "comment": "Nginx embedded perl module to read a request", (...) } (...)
Exact search on ID:
$ pkg search --raw --raw-format json-compact --search name --exact nginx { "name": "nginx", "origin": "www/nginx", "version": "1.24.0_14,3", "comment": "Robust and small WWW server", "maintainer": "joneum@FreeBSD.org", "www": "https://nginx.com/", "abi": "FreeBSD:13:amd64", "arch": "freebsd:13:x86:64", "prefix": "/usr/local", "sum": "c39a7696e6eda7bfedba251e4480e50d4c65c520d5a783a584b19b3ef883", "flatsize": 1464332, "path": "All/nginx-1.24.0_14,3.pkg", "repopath": "All/nginx-1.24.0_14,3.pkg", "licenselogic": "single", "licenses": [ "BSD2CLAUSE" ], "pkgsize": 473632, "desc": "NGINX is a high performance edge web server with the (...)", "deps": { "pcre2": { "origin": "devel/pcre2", "version": "10.42" } }, "categories": [ "www" ], "shlibs_required": [ "libpcre2-8.so.0" ], "options": { "AJP": "off", "ARRAYVAR": "off", "AWS_AUTH": "off", "BROTLI": "off", "CACHE_PURGE": "off", "CLOJURE": "off", "COOKIE_FLAG": "off", "CT": "off", "DEBUG": "off", "DEBUGLOG": "off", "DEVEL_KIT": "off", "DRIZZLE": "off", "DSO": "on", "DYNAMIC_UPSTREAM": "off", "ECHO": "off", "ENCRYPTSESSION": "off", "FILE_AIO": "on", "FIPS_CHECK": "off", "FORMINPUT": "off", "GOOGLE_PERFTOOLS": "off", "GRIDFS": "off", "GSSAPI_HEIMDAL": "off", "GSSAPI_MIT": "off", "HEADERS_MORE": "off", "HTTP": "on", "HTTPV2": "on", "HTTPV3": "off", "HTTPV3_BORING": "off", "HTTPV3_LSSL": "off", "HTTPV3_QTLS": "off", "HTTP_ACCEPT_LANGUAGE": "off", "HTTP_ADDITION": "on", "HTTP_AUTH_DIGEST": "off", "HTTP_AUTH_KRB5": "off", "HTTP_AUTH_LDAP": "off", "HTTP_AUTH_PAM": "off", "HTTP_AUTH_REQ": "on", "HTTP_CACHE": "on", "HTTP_DAV": "on", "HTTP_DAV_EXT": "off", "HTTP_DEGRADATION": "off", "HTTP_EVAL": "off", "HTTP_FANCYINDEX": "off", "HTTP_SUBS_FILTER": "off", "HTTP_TARANTOOL": "off", "HTTP_UPLOAD": "off", "HTTP_UPLOAD_PROGRESS": "off", "HTTP_UPSTREAM_CHECK": "off", "HTTP_UPSTREAM_FAIR": "off", "HTTP_UPSTREAM_STICKY": "off", "HTTP_VIDEO_THUMBEXTRACTOR": "off", "HTTP_XSLT": "off", "HTTP_ZIP": "off", "ICONV": "off", "IPV6": "on", "LET": "off", "LINK": "off", "LUA": "off", "MAIL": "on", "MAIL_IMAP": "off", "MAIL_POP3": "off", "MAIL_SMTP": "off", "MAIL_SSL": "on", "MEMC": "off", "MODSECURITY3": "off", "NAXSI": "off", "NJS": "off", "NJS_XML": "off", "OPENTRACING": "off", "PASSENGER": "off", "POSTGRES": "off", "RDS_CSV": "off", "RDS_JSON": "off", "REDIS2": "off", "RTMP": "off", "SET_MISC": "off", "SFLOW": "off", "SHIBBOLETH": "off", "SLOWFS_CACHE": "off", "SRCACHE": "off", "STREAM": "on", "STREAM_REALIP": "on", "STREAM_SSL": "on", "STREAM_SSL_PREREAD": "on", "STS": "off", "THREADS": "on", "VOD": "off", "VTS": "off", "WEBSOCKIFY": "off", "WWW": "on", "XSS": "off" }, "annotations": { "FreeBSD_version": "1302001", "build_timestamp": "2024-01-07T10:41:34+0000", "built_by": "poudriere-git-3.4.0", "cpe": "cpe:2.3:a:f5:nginx:1.24.0:::::freebsd13:x64:14", "port_checkout_unclean": "no", "port_git_hash": "756e18783", "ports_top_checkout_unclean": "no", "ports_top_git_hash": "756e18783" } }
Extended search:
$ pkg search --raw --raw-format json-compact --search name --search comment --search description nginx
- install(package_id, version=None)[source]¶
Install one package.
$ pkg install --yes dmg2img Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: dmg2img: 1.6.7 [FreeBSD] Number of packages to be installed: 1 [1/1] Installing dmg2img-1.6.7... [1/1] Extracting dmg2img-1.6.7: 100%
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ pkg upgrade --yes
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ pkg upgrade --yes dmg2img
- remove(package_id)[source]¶
Remove one package.
$ pkg delete --yes dmg2img Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages: Installed packages to be REMOVED: dmg2img: 1.6.7 Number of packages to be removed: 1 [1/1] Deinstalling dmg2img-1.6.7... [1/1] Deleting files for dmg2img-1.6.7: 100% pkg: Package database is busy while closing!
- Return type:
- sync()[source]¶
Sync package metadata.
$ IGNORE_OSVERSION=yes pkg update Updating FreeBSD repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 Fetching packagesite.pkg: 100% 7 MiB 3.6MB/s 00:02 Processing entries: 100% FreeBSD repository update completed. 33804 packages processed. All repositories are up to date.
The
IGNORE_OSVERSION=yesprevents blocking update:$ pkg update Updating FreeBSD repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 Fetching packagesite.pkg: 100% 7 MiB 3.6MB/s 00:02 Processing entries: 0% Newer FreeBSD version for package zziplib: To ignore this error set IGNORE_OSVERSION=yes - package: 1302001 - running kernel: 1301000 Ignore the mismatch and continue? [y/N]:
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
$ pkg autoremove --yes Checking integrity... done (0 conflicting) Nothing to do.
$ pkg clean --yes --all Nothing to do.
- Return type:
- cli_names: tuple[str, ...] = ('pkg',)¶
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 = 'pkg'¶
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.
- class meta_package_manager.managers.pkg.Ports[source]¶
Bases:
PackageManagerFreeBSD ports tree (source-build) manager.
Note
Coexists with
PKGon the same system: both share the install database maintained bypkg.Portsis concerned with building and tracking ports installed from source under/usr/ports, whilePKGhandles binary packages from the FreeBSD repository. Listing operations may overlap becausepkgdoes not distinguish between ports-built and binary-installed packages once they are registered in the database.Caution
Mutating operations require root privileges and a populated ports tree at
/usr/ports. The manager flags itself unavailable when the tree is missing.Initialize
cli_errorslist.- name: str = 'FreeBSD Ports Tree'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://www.freebsd.org/ports/'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='freebsd', name='FreeBSD')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a frozenset of
Platforminstances at instantiation.
- cli_names: tuple[str, ...] = ('make',)¶
The ports tree is driven by FreeBSD’s make.
No dedicated frontend exists; each port is a directory whose
Makefiletargets are invoked directly.
- extra_env: ClassVar = {'BATCH': 'yes'}¶
Force non-interactive builds.
Many ports prompt for build option dialogs by default.
BATCH=yesaccepts the saved or default options without user interaction, which is the only sensible behavior for an automated tool. Seeports(7).
- version_cli_options: tuple[str, ...] = ('-V', '.MAKE.VERSION')¶
FreeBSD
makeexposes its version via internal variable expansion.GNU Make’s
--versionflag does not work on BSD make; using-V .MAKE.VERSIONkeeps the probe portable and avoids accidentally matching a GNU Make installation shadowing the BSD binary.
- version_regexes: tuple[str, ...] = ('(?P<version>\\d{8,})',)¶
BSD make reports its version as a date-like integer (e.g.
20240218).
- property available: bool¶
Available only when
makeis found and the ports tree exists.The make binary alone is not enough: without a populated
/usr/portsdirectory, every operation would fail. Treat the tree as part of the manager’s runtime requirement.
- id: str = 'ports'¶
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.
- property installed: Iterator[Package]¶
Fetch packages currently registered as installed.
Delegates to
pkg querybecause the ports tree itself maintains no registry: ports installs are recorded in the same database as binarypkginstalls.$ pkg query "%n %v %o %c" curl 8.7.1 ftp/curl Non-interactive tool to get files from FTP/HTTP servers python311 3.11.9 lang/python311 Interpreted object-oriented programming language
- 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.
- property outdated: Iterator[Package]¶
Fetch packages whose installed version lags the ports tree.
Uses
pkg versionin ports-comparison mode (-PL=): it walks the local tree for each installed package and reports those with a newerMakefileversion available.$ pkg version -vIPL= curl-8.7.1 < needs updating (port has 8.8.0) python311-3.11.9 < needs updating (port has 3.11.10) vim-9.1.0 = up-to-date with port
- install(package_id, version=None)[source]¶
Build and install a port from source.
package_idmay be either a bare port name (e.g.nginx) or its full origin (e.g.www/nginx). When given a bare name, the origin is resolved throughpkg search -oagainst the active repository.$ cd /usr/ports/www/nginx && sudo make BATCH=yes install clean
- Return type:
- upgrade_all_cli()[source]¶
Generate the CLI to upgrade every outdated port.
The ports tree has no first-party batch upgrader; the workflow relies on the third-party
portmastertool. We build the command line without checking thatportmasteris installed, because upgrade commands are typically printed for the user to inspect before running.$ sudo portmaster --no-confirm --no-term-title -a
- upgrade_one_cli(package_id, version=None)[source]¶
Generate the CLI to upgrade one port via
portmaster.$ sudo portmaster --no-confirm --no-term-title www/nginx
- remove¶
Reuses
PKG.remove(): the ports tree has no native uninstaller, and removal goes through the shared install database regardless of how the package was originally built.
- sync()[source]¶
Refresh the local ports tree from upstream.
Modern FreeBSD distributes the ports tree via Git;
portsnapwas deprecated and removed after FreeBSD 13. We pull from whatever remote the tree was checked out from.$ sudo git -C /usr/ports pull --ff-only
- Return type:
meta_package_manager.managers.scoop module¶
- class meta_package_manager.managers.scoop.Scoop[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- homepage_url: str | None = 'https://scoop.sh'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='windows', name='Windows')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=0.2.4'¶
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, ...] = ('^v(?P<version>\\S+)\\s.+', '^.+,\\stag:\\sv(?P<version>\\S+),\\s.+', '^.+\\sBump\\sto\\sversion\\s(?P<version>\\S+)\\s.+')¶
Search version at the start of a line.
> scoop --version Current Scoop version: v0.2.4 - Released at 2022-08-08 'main' bucket: 5a5b13b6c (HEAD -> master, origin/HEAD) oh-my-posh: Update to version 11.1.1
Attention
Scoop does not always provide a clean version string.
So we fallback on parsing various
git logoutput:> scoop --version Current Scoop version: b588a06e (HEAD -> master, tag: v0.5.3, origin/master, origin/HEAD) Bump 0.5.3 'main' bucket: 46c50c6b0 (HEAD -> master, origin/master, origin/HEAD) fix arm64 version
> scoop --version Current Scoop version: b588a06e chore(release): Bump to version 0.5.3 (resync) (#6436) 'main' bucket: 46c50c6b0 aqua: fix arm64 version (#7071)
- property installed: Iterator[Package]¶
Fetch installed packages.
> scoop list Installed apps: Name Version Source Updated Info ---- ------- ------ ------- ---- 7zip 22.01 main 2022-09-27 08:03:30 dark 3.11.2 main 2022-09-27 08:04:26 git 2.37.3.windows.1 main 2022-09-27 08:03:58 python 3.10.7 main 2022-09-27 08:04:53
- property outdated: Iterator[Package]¶
Fetch outdated packages.
> scoop status Name Installed Version Latest Version Missing Dependencies Info ---- ----------------- -------------- -------------------- ---- demulshooter 16.7.2 18.7.3 eduke32 20220611-10112 20220709-10115 Teracopy-np yuzu-pineapple EA-2804 EA-2830
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not support extended or exact matching. So we returns the best subset of results and let
meta_package_manager.base.PackageManager.refiltered_search()refine them.> scoop search zip Results from local buckets... Name Version Source Binaries ---- ------- ------ -------- 7zip 22.01 main 7zip19.00-helper 19.00 main busybox 4716-g31467ddfc main bunzip2 | gunzip | gzip | unzip bzip2 1.0.8.0 main gow 0.8.0 main bunzip2.exe | bzip2.exe | zip.exe gzip 1.3.12 main lzip 1.20 main unzip 6.00 main zip 3.0 main
- install(package_id, version=None)[source]¶
Install one package.
> scoop install 7zip Installing '7zip' (22.01) [64bit] from main bucket 7z2201-x64.msi (1.8 MB) [====================] 100% Checking hash of 7z2201-x64.msi ... ok. Extracting 7z2201-x64.msi ... done. Linking ~\scoopppszip\current => ~\scoopppszip.01 Creating shim for '7z'. Creating shortcut for 7-Zip (7zFM.exe) Persisting Codecs Persisting Formats Running post_install script... '7zip' (22.01) was installed successfully! Notes ----- Add 7-Zip as a context menu by running: "C:\scoop\...install-context.reg"
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
> scoop update --all
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
> scoop update 7zip
- remove(package_id)[source]¶
Remove one package.
> scoop uninstall 7zip --purge Uninstalling '7zip' (22.01). Removing shim '7z.shim'. Removing shim '7z.exe'. Removing shortcut ~\AppData\Roaming\Scoop Apps-Zip.lnk Unlinking ~\scoopppszip\current '7zip' was uninstalled.
- Return type:
- sync()[source]¶
Sync package metadata.
> scoop status WARN Scoop out of date. Run 'scoop update' to get the latest changes.
> scoop update Updating Scoop... Updating 'main' bucket... Converting 'main' bucket to git repo... Checking repo... OK The main bucket was added successfully. Scoop was updated successfully!
> scoop status Scoop is up to date. Everything is ok!
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
> scoop cleanup --all --cache Everything is shiny now!
- Return type:
- cli_names: tuple[str, ...] = ('scoop',)¶
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 = 'scoop'¶
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.
meta_package_manager.managers.sfsu module¶
sfsu (Scoop For Speed and Usability) is a fast Rust-based replacement for slow Scoop operations.
It leverages the same Scoop package ecosystem but provides native JSON output and significantly faster execution for listing, searching, and status checks. Install and upgrade operations are delegated to Scoop.
- class meta_package_manager.managers.sfsu.SFSU[source]¶
Bases:
PackageManagersfsu wraps the Scoop package ecosystem with a fast Rust implementation.
Read-only operations (list, search, outdated) use sfsu with
--jsonfor structured output. Mutating operations (install, upgrade, remove) delegate toscoopbecause sfsu does not implement them.Initialize
cli_errorslist.- homepage_url: str | None = 'https://github.com/winpax/sfsu'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='windows', name='Windows')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.16.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.
- post_args: tuple[str, ...] = ('--no-color',)¶
Global list of options used before and after the invoked package manager CLI.
Automatically added to each
meta_package_manager.base.PackageManager.run_cli()call.Essentially used to force silencing, low verbosity or no-color output.
- version_regexes: tuple[str, ...] = ('sfsu\\s+(?P<version>\\S+)',)¶
> sfsu --version sfsu 1.17.2 sprinkles 0.22.0 (crates.io published version) ...
- property installed: Iterator[Package]¶
Fetch installed packages.
> sfsu list --json [ { "name": "7zip", "version": "26.00", "source": "main", "updated": "2026-03-18 17:54:32", "notes": "" }, ... ]
- property outdated: Iterator[Package]¶
Fetch outdated packages.
Uses
sfsu status --only apps --jsonwhich returns packages with available updates.> sfsu status --only apps --json { "packages": [ { "name": "git", "current": "2.53.0.2", "available": "2.53.0.3", "missing_dependencies": [], "info": null }, ... ] }
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not support extended or exact matching. Results are refiltered by
meta_package_manager.base.PackageManager.refiltered_search().> sfsu search --json git { "main": [ { "name": "git", "bucket": "main", "version": "2.53.0.3", "installed": true, "bins": [] }, ... ], ... }
- install¶
Install one package.
> scoop install 7zip Installing '7zip' (22.01) [64bit] from main bucket 7z2201-x64.msi (1.8 MB) [====================] 100% Checking hash of 7z2201-x64.msi ... ok. Extracting 7z2201-x64.msi ... done. Linking ~\scoopppszip\current => ~\scoopppszip.01 Creating shim for '7z'. Creating shortcut for 7-Zip (7zFM.exe) Persisting Codecs Persisting Formats Running post_install script... '7zip' (22.01) was installed successfully! Notes ----- Add 7-Zip as a context menu by running: "C:\scoop\...install-context.reg"
- upgrade_all_cli¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
> scoop update --all
- upgrade_one_cli¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
> scoop update 7zip
- remove¶
Remove one package.
> scoop uninstall 7zip --purge Uninstalling '7zip' (22.01). Removing shim '7z.shim'. Removing shim '7z.exe'. Removing shortcut ~\AppData\Roaming\Scoop Apps-Zip.lnk Unlinking ~\scoopppszip\current '7zip' was uninstalled.
- sync()[source]¶
Sync package metadata.
Uses sfsu’s native
updatecommand which updates Scoop and all buckets.> sfsu update
- Return type:
- cleanup()[source]¶
Removes old versions of all installed apps and clears the cache.
> sfsu cleanup --all --cache
- Return type:
- cli_names: tuple[str, ...] = ('sfsu',)¶
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 = 'sfsu'¶
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.
meta_package_manager.managers.snap module¶
- class meta_package_manager.managers.snap.Snap[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- homepage_url: str | None = 'https://snapcraft.io'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=2.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.
- post_args: tuple[str, ...] = ('--color=never',)¶
Global list of options used before and after the invoked package manager CLI.
Automatically added to each
meta_package_manager.base.PackageManager.run_cli()call.Essentially used to force silencing, low verbosity or no-color output.
- version_regexes: tuple[str, ...] = ('snap\\s+(?P<version>\\S+)',)¶
$ snap --version snap 2.44.1 snapd 2.44.1 series 16 linuxmint 19.3 kernel 4.15.0-91-generic
- property installed: Iterator[Package]¶
Fetch installed packages.
$ snap list --color=never Name Version Rev Aufzeichnung Herausgeber Hinweise core 16-2.44.1 8935 latest/stable canonical✓ core wechat 2.0 7 latest/stable ubuntu-dawndiy - pdftk 2.02-4 9 latest/stable smoser -
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ snap refresh --list --color=never Name Version Rev Herausgeber Hinweise standard-notes 3.3.5 8 standardnotes✓ -
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search is extended by default. So we returns the best subset of results and let
meta_package_manager.base.PackageManager.refiltered_search()refine them.$ snap find doc --color=never Name Version Herausgeber Hinweise Zusammenfassung journey 2.14.3 2appstudio - Your private diary. nextcloud 17.0.5snap1 nextcloud✓ - Nextcloud Server skype 8.58.0.93 skype✓ classic One Skype for all.
- install(package_id, version=None)[source]¶
Install one package.
$ snap install standard-notes --color=never
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ snap refresh --color=never
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ snap refresh standard-notes --color=never
- cli_names: tuple[str, ...] = ('snap',)¶
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 = 'snap'¶
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.
- remove(package_id)[source]¶
Remove one package.
$ snap remove standard-notes --color=never
- Return type:
meta_package_manager.managers.steamcmd module¶
- class meta_package_manager.managers.steamcmd.SteamCMD[source]¶
Bases:
PackageManagerBasic SteamCMD usage.
SteamCMD doesn’t seem to be properly documented and maintained to offer a powerful automated integration.
Documentation:
`list of steamcmd commands
<https://github.com/dgibbs64/SteamCMD-Commands-List/blob/master/steamcmd_commands.txt>`_
Todo
Evaluate steam-cli as an alternative.
Initialize
cli_errorslist.- name: str = 'Valve Steam'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://developer.valvesoftware.com/wiki/SteamCMD'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = None¶
Accept any SteamCMD version as it seems it is hardly versioned at all.
- post_args: tuple[str, ...] = ('+quit',)¶
Global list of options used before and after the invoked package manager CLI.
Automatically added to each
meta_package_manager.base.PackageManager.run_cli()call.Essentially used to force silencing, low verbosity or no-color output.
- version_cli_options: tuple[str, ...] = ('+quit',)¶
CLI options used to produce the version of the package manager.
The raw output produced by the package manager CLI will be parsed with the
version_regexesbelow to extract the version number.
- version_regexes: tuple[str, ...] = ('Valve\\ Corporation\\ -\\ version\\ (?P<version>\\S+)',)¶
$ steamcmd +quit Redirecting stderr to '~/Library/Application Support/Steam/logs/stderr.txt' [ 0%] Checking for available updates... [----] Verifying installation... Steam Console Client (c) Valve Corporation - version 1648077083 -- type 'quit' to exit -- Loading Steam API...OK
- cli_names: tuple[str, ...] = ('steamcmd',)¶
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 = 'steamcmd'¶
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.
- install(package_id, version=None)[source]¶
Install one package.
$ steamcmd +app_update 740 validate +quit
- Return type:
meta_package_manager.managers.uv module¶
- class meta_package_manager.managers.uv.UVBase[source]¶
Bases:
PackageManagerVirtual package manager shared by
UVandUVXCLI defined below.Hint
Package spec are not quoted anywhere here to workaround issues with how uv fails to parses them sometimes.
Initialize
cli_errorslist.- homepage_url: str | None = 'https://docs.astral.sh/uv'¶
Home page of the project, only used in documentation for reference.
- requirement: str | None = '>=0.5.0'¶
0.5.0 is the first version to introduce
pip list --outdatedcommand.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- virtual: bool = True¶
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.
- pre_args: tuple[str, ...] = ('--color', 'never', '--no-progress')¶
--color color-choiceControl colors in output [default:
auto]Possible values: -
auto: Enables colored output only when the output is going to a terminal or TTY with support -always: Enables colored output regardless of the detected environment -never: Disables colored output
--no-progressHide all progress outputs.
For example, spinners or progress bars.
- version_regexes: tuple[str, ...] = ('uv\\s+(?P<version>\\S+)',)¶
$ uv --version uv 0.2.21 (ebfe6d8fc 2024-07-03)
- cli_names: tuple[str, ...] = ('uvbase',)¶
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.uv.UV[source]¶
Bases:
UVBasePython package manager using uv pip commands.
Initialize
cli_errorslist.- property installed: Iterator[Package]¶
Fetch installed packages.
$ uv --color never --no-progress pip list --format=json | jq [ { "name": "markupsafe", "version": "2.1.5" }, { "name": "meta-package-manager", "version": "5.17.0", "editable_project_location": "/Users/kde/meta-package-manager" }, { "name": "myst-parser", "version": "3.0.1" }, (...) ]
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ uv --color never --no-progress pip list --outdated --format=json | jq [ { "name": "lark-parser", "version": "0.7.8", "latest_version": "0.12.0", "latest_filetype": "wheel" }, { "name": "types-setuptools", "version": "75.3.0.20241107", "latest_version": "75.3.0.20241112", "latest_filetype": "wheel" } ]
- install(package_id, version=None)[source]¶
Install one package.
$ uv --color never --no-progress pip install arrow
- Return type:
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade the package provided as parameter.
$ uv --color never --no-progress pip install --upgrade arrow
- remove(package_id)[source]¶
Remove one package.
$ uv --color never --no-progress pip uninstall arrow
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
$ uv --color never --no-progress cache clean Clearing cache at: /Users/kde/Library/Caches/uv Removed 97279 files (2.0GiB)
$ uv --color never --no-progress cache prune No cache found at: /Users/kde/.cache/uv
- Return type:
- cli_names: tuple[str, ...] = ('uv',)¶
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 = 'uv'¶
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.
- class meta_package_manager.managers.uv.UVX[source]¶
Bases:
UVBaseUV tool manager for isolated Python tools.
Like
pipx, but usesuv toolcommands.Initialize
cli_errorslist.- homepage_url: str | None = 'https://docs.astral.sh/uv/guides/tools/'¶
Home page of the project, only used in documentation for reference.
- requirement: str | None = '>=0.10.10'¶
0.10.10 is the first version to introduce
tool list --outdatedcommand.
- cli_names: tuple[str, ...] = ('uv',)¶
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).
- property installed: Iterator[Package]¶
Fetch installed packages.
$ uv --color never --no-progress tool list pycowsay v0.0.0.1 - pycowsay
- id: str = 'uvx'¶
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.
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ uv --color never --no-progress tool list --outdated pycowsay v0.0.0.1 [latest: 0.0.0.2] - pycowsay
- 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.
- install(package_id, version=None)[source]¶
Install one package.
$ uv --color never --no-progress tool install pycowsay
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages.
$ uv --color never --no-progress tool upgrade --all Updated pycowsay v0.0.0.1 -> v0.0.0.2 - pycowsay
meta_package_manager.managers.vscode module¶
- class meta_package_manager.managers.vscode.VSCode[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- name: str = 'Visual Studio Code'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://code.visualstudio.com'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.60.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.
- cli_names: tuple[str, ...] = ('code',)¶
$ code --version 1.60.2 7f6ab5485bbc008386c4386d08766667e155244e x64
- property installed: Iterator[Package]¶
Fetch installed packages.
$ code --list-extensions --show-versions ms-python.python@2021.9.1246542782 ms-python.vscode-pylance@2021.9.3 ms-toolsai.jupyter@2021.8.2041215044 ms-toolsai.jupyter-keymap@1.0.0 samuelcolvin.jinjahtml@0.16.0 tamasfe.even-better-toml@0.14.2 trond-snekvik.simple-rst@1.5.0
- install(package_id, version=None)[source]¶
Install one package.
$ code --install-extension tamasfe.even-better-toml
- Return type:
- remove(package_id)[source]¶
Remove one package.
$ code --uninstall-extension tamasfe.even-better-toml
- Return type:
- id: str = 'vscode'¶
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.
- class meta_package_manager.managers.vscode.VSCodium[source]¶
Bases:
VSCodeInitialize
cli_errorslist.- homepage_url: str | None = 'https://vscodium.com'¶
Home page of the project, only used in documentation for reference.
- cli_names: tuple[str, ...] = ('codium',)¶
$ code --version 1.60.2 7f6ab5485bbc008386c4386d08766667e155244e x64
- id: str = 'vscodium'¶
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.
meta_package_manager.managers.winget module¶
- class meta_package_manager.managers.winget.WinGet[source]¶
Bases:
PackageManagerInitialize
cli_errorslist.- homepage_url: str | None = 'https://github.com/microsoft/winget-cli'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='windows', name='Windows')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.28.190'¶
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.
- post_args: tuple[str, ...] = ('--accept-source-agreements', '--disable-interactivity')¶
--accept-source-agreements:Used to accept the source license agreement, and avoid the following prompt:
--disable-interactivity:Disable interactive prompts.
- ..todo::
Add the
--no-progressoption once it is available in the stable release: - https://github.com/microsoft/winget-cli/pull/6049 - https://github.com/microsoft/winget-cli/issues/3494#issuecomment-3921618377
- version_regexes: tuple[str, ...] = ('v(?P<version>\\S+)',)¶
PS C:\Users\kev> winget --version v1.28.220
- property installed: Iterator[Package]¶
Fetch installed packages.
PS C:\Users\kev> winget list --details --accept-source-agreements --disable-interactivity (1/7) CCleaner [CCleaner] Version: 6.08 Publisher: Piriform Software Ltd Local Identifier: ARP\Machine\X64\CCleaner Product Code: CCleaner Installer Category: exe Installed Scope: Machine Installed Architecture: X64 Installed Locale: en-US Origin Source: winget Available Upgrades: (2/7) Git [Git.Git] Version: 2.37.3 Publisher: The Git Development Community ...
Only returns packages with Origin Source: winget to exclude packages installed via other sources (e.g., sideload, portable).
- property outdated: Iterator[Package]¶
Fetch outdated packages.
PS C:\Users\kev> winget list --upgrade-available --details --accept-source-agreements --disable-interactivity (1/4) Git [Git.Git] Version: 2.37.3 Publisher: The Git Development Community ... Available Upgrades: winget [2.45.1] (2/4) Microsoft Edge [Microsoft.Edge] Version: 109.0.1518.70 Publisher: Microsoft ... Available Upgrades: winget [125.0.2535.51]
Only returns packages with Origin Source: winget to exclude packages installed via other sources (e.g., sideload, portable).
- search(query, extended, exact)[source]¶
Fetch matching packages.
PS C:\Users\kev> winget search --query vscode --accept-source-agreements --disable-interactivity Name Id Version Match Source --------------------------------------------------------------------------------------------------------- Microsoft Visual Studio Code Microsoft.VisualStudioCode 1.89.1 Moniker: vscode winget MrCode zokugun.MrCode 1.82.0.23253 Tag: vscode winget VSCodium Insiders VSCodium.VSCodium.Insiders 1.88.0.24095 Tag: vscode winget VSCodium VSCodium.VSCodium 1.89.1.24130 Tag: vscode winget Upgit pluveto.Upgit 0.2.18 Tag: vscode winget vscli michidk.vscli 0.3.0 Tag: vscode winget Huawei QuickApp IDE Huawei.QuickAppIde 14.0.1 Tag: vscode winget TheiaBlueprint EclipseFoundation.TheiaBlueprint 1.44.0 Tag: vscode winget Codium Alex313031.Codium 1.86.2.24053 Tag: vscode winget Cursor Editor CursorAI,Inc.Cursor latest Tag: vscode winget Microsoft Visual Studio Code CLI Microsoft.VisualStudioCode.CLI 1.89.1 Moniker: vscode-cli winget
PS C:\Users\kev> winget search --query vscode --exact --accept-source-agreements --disable-interactivity Name Id Version Match Source ------------------------------------------------------------------------------------------------- Microsoft Visual Studio Code Microsoft.VisualStudioCode 1.89.1 Moniker: vscode winget MrCode zokugun.MrCode 1.82.0.23253 Tag: vscode winget VSCodium Insiders VSCodium.VSCodium.Insiders 1.88.0.24095 Tag: vscode winget VSCodium VSCodium.VSCodium 1.89.1.24130 Tag: vscode winget Upgit pluveto.Upgit 0.2.18 Tag: vscode winget vscli michidk.vscli 0.3.0 Tag: vscode winget Huawei QuickApp IDE Huawei.QuickAppIde 14.0.1 Tag: vscode winget TheiaBlueprint EclipseFoundation.TheiaBlueprint 1.44.0 Tag: vscode winget Codium Alex313031.Codium 1.86.2.24053 Tag: vscode winget Cursor Editor CursorAI,Inc.Cursor latest Tag: vscode winget
PS C:\Users\kev> winget search --id VSCodium.VSCodium --accept-source-agreements --disable-interactivity Name Id Version Source ---------------------------------------------------------------- VSCodium Insiders VSCodium.VSCodium.Insiders 1.88.0.24095 winget VSCodium VSCodium.VSCodium 1.89.1.24130 winget
PS C:\Users\kev> winget search --name Codium --accept-source-agreements --disable-interactivity Name Id Version Source ---------------------------------------------------------------- Codium Alex313031.Codium 1.86.2.24053 winget VSCodium Insiders VSCodium.VSCodium.Insiders 1.88.0.24095 winget VSCodium VSCodium.VSCodium 1.89.1.24130 winget
PS C:\Users\kev> winget search --id VSCodium.VSCodium --exact --accept-source-agreements --disable-interactivity Name Id Version Source ---------------------------------------------- VSCodium VSCodium.VSCodium 1.89.1.24130 winget
PS C:\Users\kev> winget search --name Codium --exact --accept-source-agreements --disable-interactivity Name Id Version Source -------------------------------------------- Codium Alex313031.Codium 1.86.2.24053 winget
- install(package_id, version=None)[source]¶
Install one package.
PS C:\Users\kev> winget install --id Microsoft.PowerToys --accept-package-agreements --version 0.15.2 --accept-source-agreements --disable-interactivity Found Power Toys [Microsoft.PowerToys] Version 0.15.2 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Successfully verified installer hash Starting package install... ██████████████████████████████ 100% Successfully installed
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
PS C:\Users\kev> winget upgrade --all --accept-package-agreements --accept-source-agreements --disable-interactivity Name Id Version Available Source ------------------------------------------------------------------------------------------------ Microsoft Edge Microsoft.Edge 109.0.1518.70 125.0.2535.51 winget Microsoft Edge WebView2 Runtime Microsoft.EdgeWebView2Runtime 109.0.1518.70 125.0.2535.51 winget Python Launcher Python.Launchez < 3.12.0 3.12.0 winget Microsoft Visual C++ (x86)... Microsoft.VCRedist.2015+.X86 14.34.31931.0 14.38.33135.0 winget 4 upgrades available. Installing dependencies: This package requires the following dependencies: - Packages Microsoft.UI.Xaml.2.8 [>= 8.2306.22001.0] (1/3) Found Microsoft Edge WebView2 Runtime [Microsoft.EdgeWebView2Runtime] Version 125. 0.2535.51 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/e5dd841e-17ff-43b7-a2c0-ff759f55c202/MicrosoftEdgeWebView2RuntimeInstallerARM64.exe ██████████████████████████████ 166 MB / 166 MB Successfully verified installer hash Starting package install... Successfully installed (...)
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
PS C:\Users\kev> winget upgrade --id Git.Git --accept-package-agreements --accept-source-agreements --disable-interactivity Found Git [Git.Git] Version 2.45.1 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://github.com/git-for-windows/git/releases/download/v2.45.1.windows.1/Git-2.45.1-64-bit.exe ██████████████████████████████ 64.7 MB / 64.7 MB Successfully verified installer hash Starting package install... Successfully installed
Todo
Automatically uninstall the package if the technology is different:
PS C:\Users\kev> winget upgrade --id Microsoft.Edge A newer version was found, but the install technology is different from the current version installed. Please uninstall the package and install the newer version.
- cli_names: tuple[str, ...] = ('winget',)¶
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 = 'winget'¶
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.
- remove(package_id)[source]¶
Remove one package.
PS C:\Users\kev> winget uninstall --id Microsoft.PowerToys --source winget --accept-source-agreements --disable-interactivity Found PowerToys (Preview) [Microsoft.PowerToys] Starting package uninstall... ██████████████████████████████ 100% Successfully uninstalled
- Return type:
meta_package_manager.managers.xbps module¶
- class meta_package_manager.managers.xbps.XBPS[source]¶
Bases:
PackageManagerX Binary Package System used by Void Linux.
Note
XBPS is split across several sibling binaries:
xbps-queryfor read-only operations,xbps-installfor installs, sync and upgrades, andxbps-removefor uninstalls and cache cleanup.mpmresolves the siblings from the same directory ascli_path.Initialize
cli_errorslist.- homepage_url: str | None = 'https://github.com/void-linux/xbps'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({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='cloudlinux', name='CloudLinux OS'), Platform(id='debian', name='Debian'), 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='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='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='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=0.59'¶
Version 0.59 is the first to ship the long-form options (
--list-pkgs,--repository,--search,--update,--dry-run,--sync,--yes,--clean-cache,--remove-orphans) that the methods below depend on.
- cli_names: tuple[str, ...] = ('xbps-install',)¶
Use
xbps-installas the canonical entry point.The other XBPS binaries (
xbps-query,xbps-remove) are looked up in the same directory asxbps-installviacli_path.
- property installed: Iterator[Package]¶
Fetch installed packages.
$ xbps-query --list-pkgs ii base-files-0.144_1 Void Linux base system files ii cmark-gfm-0.29.0.gfm.13_1 CommonMark parsing and rendering library ii curl-8.5.0_1 Command line tool for transferring data
- property outdated: Iterator[Package]¶
Fetch outdated packages.
Caution
Reads from the local repository cache. Run
sync()first to refresh the index.$ xbps-install --update --dry-run firefox-120.0_1 update x86_64 https://repo-default.voidlinux.org/current 45MB 12MB python3-3.11.6_2 update x86_64 https://repo-default.voidlinux.org/current 30MB 8MB
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
xbps-query --searchmatches againstpkgverandshort_descproperties at the same time. Extended and exact matching are not supported, so the best subset of results is returned and refined later bymeta_package_manager.base.PackageManager.refiltered_search().$ xbps-query --repository --search firefox [-] firefox-120.0_1 Standalone web browser from mozilla.org [*] firefox-esr-115.5.0_1 Extended support release of Firefox
- id: str = 'xbps'¶
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.
- install(package_id, version=None)[source]¶
Install one package.
$ sudo xbps-install --yes firefox
- Return type:
- 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.
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages.
$ sudo xbps-install --sync --update --yes
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade one package.
$ sudo xbps-install --update --yes firefox
- remove(package_id)[source]¶
Remove one package, recursively dropping orphaned dependencies.
$ sudo xbps-remove --recursive --yes firefox
- Return type:
meta_package_manager.managers.yarn module¶
- class meta_package_manager.managers.yarn.Yarn[source]¶
Bases:
PackageManagerVirtual package manager shared by Yarn Classic and Yarn Berry.
See command equivalences at: https://github.com/antfu-collective/ni?tab=readme-ov-file#ni
Initialize
cli_errorslist.- homepage_url: str | None = 'https://yarnpkg.com'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='macos', name='macOS'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), 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 frozenset of
Platforminstances at instantiation.
- virtual: bool = True¶
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.
- cleanup()[source]¶
Removes things we don’t need anymore.
See: https://yarnpkg.com/cli/cache/clean
$ yarn cache clean --all yarn cache v1.22.19 success Cleared cache. ✨ Done in 0.35s.
- Return type:
- cli_names: tuple[str, ...] = ('yarn',)¶
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.yarn.YarnClassic[source]¶
Bases:
YarnYarn Classic (1.x) package manager.
Warning
Yarn Classic has been in maintenance mode since January 2020. Only critical and security patches are accepted. Yarn Berry (2.x+) is the actively developed line but uses a fundamentally different CLI surface, so it is handled by a separate
YarnBerrymanager.Initialize
cli_errorslist.- id: str = 'yarn'¶
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 = 'Yarn Classic'¶
Return package manager’s common name.
Default value is based on class name.
- requirement: str | None = '>=1.20.0,<2.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.
- cli_names: tuple[str, ...] = ('yarn',)¶
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).
- property installed: Iterator[Package]¶
Fetch installed packages.
$ yarn global --json list --depth 0 {"type":"activityStart","data":{"id":0}} {"type":"activityTick","data":{"id":0,"name":"awesome-lint@^0.18.0"}} {"type":"activityTick","data":{"id":0,"name":"arrify@^2.0.1"}} {"type":"activityTick","data":{"id":0,"name":"case@^1.6.3"}} {"type":"activityTick","data":{"id":0,"name":"emoji-regex@^9.2.0"}} (...) {"type":"activityEnd","data":{"id":0}} {"type":"progressStart","data":{"id":0,"total":327}} {"type":"progressTick","data":{"id":0,"current":1}} {"type":"progressTick","data":{"id":0,"current":2}} {"type":"progressTick","data":{"id":0,"current":3}} {"type":"progressTick","data":{"id":0,"current":4}} {"type":"progressTick","data":{"id":0,"current":5}} (...) {"type":"progressFinish","data":{"id":0}} {"type":"info","data":""awesome-lint@0.18.0" has binaries:"} {"type":"list","data":{"type":"bins-awesome-lint","items":["awesome-lint"]}}
$ yarn global list --depth 0 yarn global v1.22.19 info "awesome-lint@0.18.0" has binaries: - awesome-lint ✨ Done in 0.13s.
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ yarn --json outdated --cwd ~/.config/yarn/global | jq {"type":"warning","data":"package.json: No license field"} { "type": "info", "data": "Color legend : \n" " \"<red>\" : Major Update backward-incompatible updates \n" " \"<yellow>\" : Minor Update backward-compatible features \n" " \"<green>\" : Patch Update backward-compatible bug fixes" } { "type": "table", "data": { "head": [ "Package", "Current", "Wanted", "Latest", "Package Type", "URL" ], "body": [ [ "markdown", "0.4.0", "0.4.0", "0.5.0", "dependencies", "git://github.com/evilstreak/markdown-js.git" ] ] } }
$ yarn outdated --cwd ~/.config/yarn/global yarn outdated v1.22.19 warning package.json: No license field info Color legend : "<red>" : Major Update backward-incompatible updates "<yellow>" : Minor Update backward-compatible features "<green>" : Patch Update backward-compatible bug fixes Package Current Wanted Latest Package Type URL markdown 0.4.0 0.4.0 0.5.0 dependencies git://github.com/.../md-js.git ✨ Done in 0.95s.
- search(query, extended, exact)[source]¶
Fetch matching packages.
Warning
Yarn maintainers have decided to not implement a dedicated search command.
Search is simulated by a direct call to
yarn info, and as a result only works for exact match.$ yarn --json info python | jq { "type": "inspect", "data": { "name": "python", "description": "Interact with python child process", "dist-tags": { "latest": "0.0.4" }, "versions": [ "0.0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4" ], "maintainers": [ { "name": "drderidder", "email": "drderidder@gmail.com" } ], "time": { "modified": "2017-09-16T05:26:13.151Z", "created": "2011-07-11T01:59:04.362Z", "0.0.0": "2011-07-11T01:59:05.137Z", "0.0.1": "2011-07-17T05:23:33.166Z", "0.0.2": "2011-07-20T03:42:50.379Z", "0.0.3": "2014-06-08T00:39:08.562Z", "0.0.4": "2015-01-25T02:48:07.820Z" }, "author": { "name": "Darren DeRidder" }, "repository": { "type": "git", "url": "git://github.com/73rhodes/node-python.git" }, "homepage": "https://github.com/73rhodes/node-python", "bugs": { "url": "https://github.com/73rhodes/node-python/issues" }, "readmeFilename": "README.md", "users": { "dewang-mistry": true, "goliatone": true, "sapanbhuta": true, "aditcmarix": true, "imlucas": true, "heyderpd": true, "ukuli": true, "chbardel": true, "asaupup": true, "nuwaio": true }, "version": "0.0.4", "main": "./lib/python.js", "engines": { "node": ">= 0.4.1" }, "gitHead": "69754aaa57658193916a1bf5fc391198098f74f6", "scripts": {}, "dist": { "shasum": "3094e898ef17a33aa9c3e973b3848a38e47d1818", "tarball": "https://registry.npmjs.org/python/-/python-1.tgz" }, "directories": {} } }
- install(package_id, version=None)[source]¶
Install one package.
$ yarn global add awesome-lint yarn global v1.22.19 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... success Installed "awesome-lint@0.18.0" with binaries: - awesome-lint ✨ Done in 16.15s.
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ yarn global upgrade --latest yarn global v1.22.19 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Rebuilding all packages... success Saved lockfile. success Saved 271 new dependencies. info Direct dependencies ├─ awesome-lint@0.18.0 └─ markdown@0.5.0 info All dependencies ├─ @babel/code-frame@7.18.6 ├─ @babel/helper-validator-identifier@7.18.6 ├─ @nodelib/fs.scandir@2.1.5 ├─ array-to-sentence@1.1.0 ├─ array-union@2.1.0 ├─ awesome-lint@0.18.0 ├─ fs.realpath@1.0.0 (...) └─ zwitch@1.0.5 ✨ Done in 19.89s.
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ yarn global upgrade markdown --latest yarn global v1.22.19 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Rebuilding all packages... success Saved lockfile. success Saved 2 new dependencies. info Direct dependencies └─ markdown@0.5.0 info All dependencies ├─ markdown@0.5.0 └─ nopt@2.1.2 ✨ Done in 1.77s.
- remove(package_id)[source]¶
Remove one package.
$ yarn global remove awesome-lint yarn global v1.22.19 [1/2] 🗑 Removing module awesome-lint... [2/2] 🔨 Regenerating lockfile and installing missing dependencies... success Uninstalled packages. ✨ Done in 0.21s.
- Return type:
- class meta_package_manager.managers.yarn.YarnBerry[source]¶
Bases:
YarnYarn Berry (2.x+) package manager.
Warning
Yarn Berry removed
yarn globalcommands entirely. There is no concept of globally installed packages, soinstalled,outdated,install,upgrade, andremoveoperations are not available.Initialize
cli_errorslist.- id: str = 'yarn-berry'¶
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 = 'Yarn Berry'¶
Return package manager’s common name.
Default value is based on class name.
- requirement: str | None = '>=2.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.
- cli_names: tuple[str, ...] = ('yarn',)¶
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).
- search(query, extended, exact)[source]¶
Fetch matching packages.
Warning
Search is simulated by a direct call to
yarn npm info, and as a result only works for exact match.$ yarn npm info python --json | jq { "name": "python", "description": "Interact with python child process", "dist-tags": { "latest": "0.0.4" }, "versions": [ "0.0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4" ], "version": "0.0.4", (...) }
meta_package_manager.managers.zypper module¶
- class meta_package_manager.managers.zypper.Zypper[source]¶
Bases:
PackageManagerZypper package manager.
Documentation:
https://documentation.suse.com/smart/linux/html/concept-zypper/index.html
https://opensuse.github.io/openSUSE-docs-revamped-temp/zypper/
See other command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta
Initialize
cli_errorslist.- homepage_url: str | None = 'https://en.opensuse.org/Portal:Zypper'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), 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='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), 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='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='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), 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='solaris', name='Solaris'), Platform(id='sunos', name='SunOS'), Platform(id='tumbleweed', name='openSUSE Tumbleweed'), 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 frozenset of
Platforminstances at instantiation.
- requirement: str | None = '>=1.14.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, ...] = ('--no-color', '--no-abbrev', '--non-interactive', '--no-cd', '--no-refresh')¶
- version_regexes: tuple[str, ...] = ('zypper\\s+(?P<version>\\S+)',)¶
$ zypper --version zypper 1.14.11
- property installed: Iterator[Package]¶
Fetch installed packages.
$ zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh --xmlout search --details --type package --installed-only
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh --xmlout list-updates <?xml version='1.0'?> <stream> <message type="info">Loading repository data...</message> <message type="info">Reading installed packages...</message> <update-status version="0.6"> <update-list> <update name="git" kind="package" edition="2.34.1-10.9.1" edition-old="2.26.2-3.34.1" arch="x86_64"> <summary>Fast, scalable revision control system</summary> <description> Blah blah blah... </description> <license/> <source url="http://download.opensuse.org/updata/leap/15.3/sle" alias="repo-sle-update"/> </update> (...) </update-list> </update-status> </stream>
- search(query, extended, exact)[source]¶
Fetch matching packages.
$ zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh --xmlout search --details --type package kopete
$ zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh --xmlout search --details --type package --search-description kopete
$ zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh --xmlout search --details --type package --match-exact kopete
$ zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh --xmlout search --details --type package --search-description --match-exact kopete
- install(package_id, version=None)[source]¶
Install one package.
$ sudo zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh install kopete
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh update
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade all packages (default) or only the one provided as parameter.
$ sudo zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh update kopete
- remove(package_id)[source]¶
Remove one package.
$ sudo zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh remove kopete
- Return type:
- sync()[source]¶
Sync package metadata.
$ sudo zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh refresh
- Return type:
- cleanup()[source]¶
Removes things we don’t need anymore.
$ sudo zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh clean
- Return type:
- cli_names: tuple[str, ...] = ('zypper',)¶
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 = 'zypper'¶
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.