meta_package_manager.managers package

Submodules

meta_package_manager.managers.apm module

class meta_package_manager.managers.apm.APM[source]

Bases: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

version_regex: 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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► apm update --no-confirm
Return type:

tuple[str, ...]

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

meta_package_manager.managers.apt module

class meta_package_manager.managers.apt.APT[source]

Bases: PackageManager

Base 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_errors list.

homepage_url: str | None = 'https://wiki.debian.org/AptCLI'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

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

--quiet: produces output suitable for logging, omitting progress indicators.

Source: https://manpages.org/apt-get/8#options

version_regex: str = 'apt\\s+(?P<version>\\S+)'
► apt --version
apt 2.0.6 (amd64)
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
Return type:

Iterator[Package]

install(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► sudo apt --quiet --yes upgrade
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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:

None

cleanup()[source]

Removes things we don’t need anymore.

► sudo apt --quiet --yes autoremove
► sudo apt --quiet --yes clean
Return type:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'APT'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

class meta_package_manager.managers.apt.APT_Mint[source]

Bases: APT

Special version of apt for Linux Mint.

Exactly the same as its parent but implement specific version extraction.

Initialize cli_errors list.

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

version_cli_options: tuple[str, ...] = ('version', 'apt')
► apt version apt
1.6.11
search(query, extended, exact)[source]

Fetch matching packages. :rtype: Iterator[Package]

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: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

pre_args: tuple[str, ...] = ('--color', 'never', '--quiet')
version_regex: str = 'cargo\\s+(?P<version>\\S+)'
► cargo --version
cargo 1.59.0
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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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:

str

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.chocolatey module

class meta_package_manager.managers.chocolatey.Choco[source]

Bases: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='windows', name='Windows', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '2.0.0'

2.0.0 is the first version which is not requiring the --local-only option, which has been entirely removed.

Source: choco options and switches.

post_args: tuple[str, ...] = ('--no-progress', '--no-color')
► choco --version
0.11.0
property installed: Iterator[Package]

Fetch installed packages.

► choco list --limit-output --no-progress --no-color
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
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
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
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
virtualbox|6.1.0
► choco search virtualbox --exact --limit-output --no-progress --no-color
virtualbox|6.1.0
Return type:

Iterator[Package]

install(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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_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
Return type:

tuple[str, ...]

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

meta_package_manager.managers.composer module

class meta_package_manager.managers.composer.Composer[source]

Bases: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.4.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

pre_args: tuple[str, ...] = ('global',)
version_regex: 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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► composer global update
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.dnf module

class meta_package_manager.managers.dnf.DNF[source]

Bases: PackageManager

Documentation: https://dnf.readthedocs.io/en/latest/command_ref.html.

See other command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta

Initialize cli_errors list.

homepage_url: str | None = 'https://github.com/rpm-software-management/dnf'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '4.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

cli_names: tuple[str, ...] = ('dnf', 'dnf4')
► dnf --version
4.9.0
pre_args: tuple[str, ...] = ('--color=never',)
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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

sync()[source]

Sync package metadata.

► dnf --color=never check-update
Return type:

None

cleanup()[source]

Removes things we don’t need anymore.

► sudo dnf --color=never --assumeyes autoremove
► dnf --color=never clean all
Return type:

None

remove(package_id)[source]

Remove one package and one only.

► sudo dnf --color=never --assumeyes autoremove package_id
Return type:

str

id: str = 'dnf'

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 = 'DNF'

Return package manager’s common name.

Default value is based on class name.

virtual: bool = False

Should we expose the package manager to the user?

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

class meta_package_manager.managers.dnf.DNF5[source]

Bases: DNF

Initialize cli_errors list.

homepage_url: str | None = 'https://github.com/rpm-software-management/dnf5'

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

requirement: str | None = '5.0.0'

dnf5 is the new reference package manager as of Fedora 41.

cli_names: tuple[str, ...] = ('dnf5',)
► dnf --version
4.9.0
pre_args: tuple[str, ...] = ()

Reset global options inherited from the DNF above.

dnf5 does not support –color=never parameter.

id: str = 'dnf5'

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 = 'DNF5'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

class meta_package_manager.managers.dnf.YUM[source]

Bases: DNF

Yum is dnf is yum.

Initialize cli_errors list.

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.

name: str = 'YUM'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

homepage_url: str | None = 'http://yum.baseurl.org'

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

cli_names: tuple[str, ...] = ('yum',)
► dnf --version
4.9.0

meta_package_manager.managers.emerge module

class meta_package_manager.managers.emerge.Emerge[source]

Bases: PackageManager

The 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_errors list.

homepage_url: str | None = 'https://wiki.gentoo.org/wiki/Portage#emerge'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '3.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

version_regex: 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 qlist binary is available and present on the system. We do not search for it or try to resolves its canonical path with PackageManager.cli_path, as we do for the reference emerge binary.

► 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$
Return type:

Iterator[Package]

install(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

sync()[source]

Sync package metadata.

► sudo emerge --sync --color n --nospinner
Return type:

None

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. :rtype: None

Warning

This suppose the eclean binary is available and present on the system. We do not search for it or try to resolves its canonical path with PackageManager.cli_path, as we do for the reference emerge binary.

► sudo emerge --update --newuse --deep --color n --nospinner @world
► sudo emerge --depclean
► sudo eclean distfiles
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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'Emerge'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.eopkg module

class meta_package_manager.managers.eopkg.EOPKG[source]

Bases: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '3.2.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

pre_args: tuple[str, ...] = ('--no-color',)
version_regex: str = 'eopkg\\s+(?P<version>\\S+)'
► eopkg --version
eopkg 3.2.0
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. :rtype: Iterator[Package]

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 --name only:

► 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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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:

str

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:

None

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:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.flatpak module

class meta_package_manager.managers.flatpak.Flatpak[source]

Bases: PackageManager

Initialize cli_errors list.

homepage_url: str | None = 'https://flatpak.org'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.2.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

version_regex: 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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► flatpak update --noninteractive
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'Flatpak'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.fwupd module

class meta_package_manager.managers.fwupd.FWUPD[source]

Bases: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances 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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

pre_args: tuple[str, ...] = ('--offline', '--assume-yes', '--no-reboot-check', '--no-device-prompt')
version_regex: 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 --offline --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 --offline --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 --offline --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 --offline --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:

str

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► sudo fwupdmgr --offline --assume-yes --no-reboot-check --no-device-prompt update
Return type:

tuple[str, ...]

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(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

sync()[source]

Sync package metadata.

► fwupdmgr --offline --assume-yes --no-reboot-check --no-device-prompt refresh --force
Updating lvfs
Downloading…             [***************************************]
Successfully downloaded new metadata: 1 local device supported
Return type:

None

meta_package_manager.managers.gem module

class meta_package_manager.managers.gem.Gem[source]

Bases: PackageManager

The RubyGems package manager.

..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_errors list.

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: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '2.5.0'
► gem --version
3.0.3
cli_search_path: tuple[str, ...] = ('/usr/local/opt/ruby/bin/gem', '/usr/local/opt/ruby/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.

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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► gem update --user-install --quiet
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

remove(package_id)[source]

Remove one package.

► gem uninstall --user-install --quiet left-pad
Successfully uninstalled left-pad-1.1.0
Return type:

str

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:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.homebrew module

class meta_package_manager.managers.homebrew.Homebrew[source]

Bases: PackageManager

Virtual package manager shared by brew and cask CLI defined below.

Homebrew is the umbrella project providing both brew and brew cask commands.

Initialize cli_errors list.

platforms: _TNestedSources = frozenset({Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

Homebrew core is now compatible with Linux and Windows Subsystem for Linux (WSL) 2.

requirement: str | None = '2.7.0'

Vanilla brew and cask CLIs now shares the same version.

2.7.0 is the first release to enforce the use of --cask option.

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: EnvVars | None = {'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_regex: 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 removed variable 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. :rtype: Iterator[Package]

Caution

Search does not supports extended mode.

► brew search sed
==> Formulae
gnu-sed ✔                    libxdg-basedir               minised
==> Casks
eclipse-dsl                       marsedit
focused                           physicseditor
google-adwords-editor             prefs-editor
licensed                          subclassed-mnemosyne
► brew search sed --formulae
==> Formulae
gnu-sed ✔                    libxdg-basedir               minised
► 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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

brew and cask share 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!
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

remove(package_id)[source]

Removes a package.

► brew uninstall bat
Uninstalling /usr/local/Cellar/bat/0.21.0... (14 files, 5MB)
Return type:

str

sync()[source]

Sync package metadata.

► brew update --quiet
Already up-to-date.
Return type:

None

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:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = 'homebrew'

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 = 'Homebrew'

Return package manager’s common name.

Default value is based on class name.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

class meta_package_manager.managers.homebrew.Brew[source]

Bases: Homebrew

Initialize cli_errors list.

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

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.

id: str = 'brew'

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

class meta_package_manager.managers.homebrew.Cask[source]

Bases: Homebrew

Initialize cli_errors list.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

platforms: _TNestedSources = frozenset({Platform(id='macos', name='macOS', current=False)})

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

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.mas module

class meta_package_manager.managers.mas.MAS[source]

Bases: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='macos', name='macOS', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.8.7'

1.8.7 is fixing the mas search command.

version_cli_options: tuple[str, ...] = ('version',)
► mas version
1.8.3
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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► mas upgrade
Return type:

tuple[str, ...]

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

remove(package_id)[source]

Removes a package.

► sudo mas uninstall 1494051017
Password:
Deleted '/Applications/SimpleLogin.app' to '/Users/kde/.Trash/SimpleLogin.app'
Return type:

str

meta_package_manager.managers.npm module

class meta_package_manager.managers.npm.NPM[source]

Bases: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '4.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

pre_args: tuple[str, ...] = ('--global', '--progress=false', '--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 --progress=false --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:

str

property installed: Iterator[Package]

Fetch installed packages.

► npm --global --progress=false --no-update-notifier --no-fund --no-audit                 --json list | jq
{
  "dependencies": {
    "npm": {
      "version": "4.0.5",
      "dependencies": {
        "JSONStream": {
          "version": "1.2.1",
          "from": "JSONStream@latest",
          "resolved": "https://(...)/JSONStream-1.2.1.tgz",
          "dependencies": {
            "jsonparse": {
              "version": "1.2.0",
              "from": "jsonparse@>=1.2.0 <2.0.0",
              "resolved": "https://(...)/jsonparse-1.2.0.tgz"
            },
            "through": {
              "version": "2.3.8",
              "from": "through@>=2.2.7 <3.0.0",
              "resolved": "https://(...)/through-2.3.8.tgz"
            }
          }
        },
        "abbrev": {
          "version": "1.0.9",
          "from": "abbrev@1.0.9",
          "resolved": "https://(...)/abbrev-1.0.9.tgz"
        },
        "ansi-regex": {
          "version": "2.0.0",
          "from": "ansi-regex@2.0.0",
          "resolved": "https://(...)/ansi-regex-2.0.0.tgz"
        },
(...)
property outdated: Iterator[Package]

Fetch outdated packages.

► npm --global --progress=false --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 :rtype: Iterator[Package]

Caution

Search does not supports exact matching.

► npm --global --progress=false --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 --progress=false --no-update-notifier --no-fund --no-audit                 search --json --no-description python | jq
install(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► npm --global --progress=false --no-update-notifier --no-fund --no-audit                 upgrade
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

remove(package_id)[source]

Remove one package and one only.

► npm --global --progress=false --no-update-notifier --no-fund --no-audit                 uninstall raven
Return type:

str

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.opkg module

class meta_package_manager.managers.opkg.OPKG[source]

Bases: PackageManager

Initialize cli_errors list.

homepage_url: str | None = 'https://git.yoctoproject.org/cgit/cgit.cgi/opkg/'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '0.2.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

version_regex: 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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► opkg upgrade
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'OPKG'

Return package manager’s common name.

Default value is based on class name.

sync()[source]

Sync package metadata.

► opkg update
Return type:

None

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.pacman module

class meta_package_manager.managers.pacman.Pacman[source]

Bases: PackageManager

See command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta.

Initialize cli_errors list.

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

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '5.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

pre_args: tuple[str, ...] = ('--noconfirm',)
version_regex: 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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade the package provided as parameter.

► sudo pacman --noconfirm --sync --refresh --sysupgrade
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

remove(package_id)[source]

Removes a package.

► sudo pacman --noconfirm --remove firefox
Return type:

str

sync()[source]

Sync package metadata.

► pacman --noconfirm --sync --refresh
Return type:

None

cleanup()[source]

Removes things we don’t need anymore.

► sudo pacman --noconfirm --sync --clean --clean
Return type:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = 'pacman'

Package manager’s ID.

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

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

name: str = 'Pacman'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

class meta_package_manager.managers.pacman.Pacaur[source]

Bases: Pacman

Pacaur wraps pacman and shadows its options.

Initialize cli_errors list.

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'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

version_regex: str = 'pacaur\\s+(?P<version>\\S+)'

Search version right after the pacaur string.

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

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'Pacaur'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

class meta_package_manager.managers.pacman.Paru[source]

Bases: Pacman

paru wraps pacman and shadows its options.

Initialize cli_errors list.

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'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

version_regex: str = 'paru\\s+v(?P<version>\\S+)'

Search version right after the paru string.

► 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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'Paru'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

class meta_package_manager.managers.pacman.Yay[source]

Bases: Pacman

yay wraps pacman and shadows its options.

Initialize cli_errors list.

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

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

homepage_url: str | None = '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.

name: str = 'Yay'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

requirement: str | None = '11.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

version_regex: str = 'yay\\s+v(?P<version>\\S+)'

Search version right after the yay string.

► yay --version
yay v11.1.2 - libalpm v13.0.1

meta_package_manager.managers.pip module

class meta_package_manager.managers.pip.Pip[source]

Bases: PackageManager

We will use the Python binary to call out pip as 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/

Initialize cli_errors list.

homepage_url: str | None = 'https://pip.pypa.io'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '10.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate 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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

pre_args: tuple[str, ...] = ('-m', 'pip', '--no-color')
version_cli_options: tuple[str, ...] = ('-m', 'pip', '--no-color', '--version')

List of options to get the version from the package manager CLI.

version_regex: 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)
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.

► python -m pip --no-color list --format=json --outdated             > --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. :rtype: Iterator[Package]

Warning

That function was previously named search but has been renamed to make it invisible from the mpm framework, disabling search feature altogether for pip.

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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.

name: str = 'Pip'

Return package manager’s common name.

Default value is based on class name.

remove(package_id)[source]

Remove one package.

► python -m pip --no-color uninstall --yes arrow
Return type:

str

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.pipx module

class meta_package_manager.managers.pipx.Pipx[source]

Bases: PackageManager

Initialize cli_errors list.

homepage_url: str | None = 'https://pipx.pypa.io'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.0.0'
► pipx --version
1.0.0
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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Upgrade all packages.

Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'Pipx'

Return package manager’s common name.

Default value is based on class name.

remove(package_id)[source]

Remove one package.

► pipx uninstall pycowsay
uninstalled pycowsay! ✨ 🌟 ✨
Return type:

str

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.pkg module

class meta_package_manager.managers.pkg.PKG[source]

Bases: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.11'

1.11 is the first version to support IGNORE_OSVERSION environment 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 upgrade instead of pkg version because 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
Return type:

Iterator[Package]

install(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► pkg upgrade --yes
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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:

str

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=yes prevents 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:

None

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:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.scoop module

class meta_package_manager.managers.scoop.Scoop[source]

Bases: PackageManager

Initialize cli_errors list.

name: str = 'Scoop'

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://scoop.sh'

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

platforms: _TNestedSources = frozenset({Platform(id='windows', name='Windows', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '0.2.4'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

version_regex: str = '^v(?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
static remove_headers(text)[source]
Return type:

str

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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► scoop update --all
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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:

str

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:

None

cleanup()[source]

Removes things we don’t need anymore.

► scoop cleanup --all --cache
Everything is shiny now!
Return type:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.snap module

class meta_package_manager.managers.snap.Snap[source]

Bases: PackageManager

Initialize cli_errors list.

homepage_url: str | None = 'https://snapcraft.io'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '2.0.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate 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_regex: 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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

upgrade_all_cli()[source]

Generates the CLI to upgrade all packages (default) or only the one provided as parameter.

► snap refresh --color=never
Return type:

tuple[str, ...]

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'Snap'

Return package manager’s common name.

Default value is based on class name.

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.steamcmd module

class meta_package_manager.managers.steamcmd.SteamCMD[source]

Bases: PackageManager

Basic 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_errors list.

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: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances 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',)

List of options to get the version from the package manager CLI.

version_regex: 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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

meta_package_manager.managers.uv module

class meta_package_manager.managers.uv.UV[source]

Bases: PackageManager

Initialize cli_errors list.

homepage_url: str | None = 'https://docs.astral.sh/uv'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '0.5.0'

0.5.0 is the first version to introduce pip list --outdated command.

pre_args: tuple[str, ...] = ('--color', 'never', '--no-progress')
  • --color color-choice

    Control 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-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

version_regex: str = 'uv\\s+(?P<version>\\S+)'
► uv --version
uv 0.2.21 (ebfe6d8fc 2024-07-03)
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 "tomli_w == 1.0.0"
Resolved 1 package in 574ms
Installed 1 package in 2ms
 + tomli-w==1.0.0
Return type:

str

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'UV'

Return package manager’s common name.

Default value is based on class name.

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 "tomli_w == 0.4.0"
Resolved 1 package in 1ms
Uninstalled 1 package in 0.54ms
Installed 1 package in 0.94ms
 - tomli-w==0.2.0
 + tomli-w==0.4.0
► uv --color never --no-progress pip install --upgrade "tomli_w"
Resolved 1 package in 2ms
Uninstalled 1 package in 1ms
Installed 1 package in 2ms
 - tomli-w==0.4.0
 + tomli-w==1.0.0
Return type:

tuple[str, ...]

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

remove(package_id)[source]

Remove one package.

► uv --color never --no-progress pip uninstall tomli_w
Uninstalled 1 package in 5ms
 - tomli-w==1.0.0
Return type:

str

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:

None

meta_package_manager.managers.vscode module

class meta_package_manager.managers.vscode.VSCode[source]

Bases: PackageManager

Initialize cli_errors list.

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: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.60.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate 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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

remove(package_id)[source]

Remove one package.

► code --uninstall-extension tamasfe.even-better-toml
Return type:

str

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.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

class meta_package_manager.managers.vscode.VSCodium[source]

Bases: VSCode

Initialize cli_errors list.

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.

name: str = 'VSCodium'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.winget module

class meta_package_manager.managers.winget.WinGet[source]

Bases: PackageManager

Initialize cli_errors list.

homepage_url: str | None = 'https://github.com/microsoft/winget-cli'

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

platforms: _TNestedSources = frozenset({Platform(id='windows', name='Windows', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.7'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate 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.

version_regex: str = 'v\\s+(?P<version>\\S+)'
PS C:\Users\kev> winget --version
v1.7.11261
property installed: Iterator[Package]

Fetch installed packages.

PS C:\Users\kev> winget list --accept-source-agreements --disable-interactivity
The 'msstore' source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").

Name                          Id                           Version        Available     Source
----------------------------------------------------------------------------------------------
CCleaner                      CCleaner                     6.08
Git                           Git.Git                      2.37.3         2.45.1        winget
Microsoft Edge                Microsoft.Edge               109.0.1518.70  125.0.2535.51 winget
Microsoft Edge Update         Microsoft Edge Update        1.3.187.37
App Installer                 Microsoft.AppInstaller       1.21.3482.0                  winget
Microsoft.UI.Xaml.2.7         Microsoft.UI.Xaml.2.7        7.2208.15002.0               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
property outdated: Iterator[Package]

Fetch outdated packages.

PS C:\Users\kev> winget list --upgrade-available --accept-source-agreements --disable-interactivity
Name                          Id                           Version       Available     Source
---------------------------------------------------------------------------------------------
Git                           Git.Git                      2.37.3        2.45.1        winget
Microsoft Edge                Microsoft.Edge               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.
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
Return type:

Iterator[Package]

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:

str

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

(...)
Return type:

tuple[str, ...]

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'WinGet'

Return package manager’s common name.

Default value is based on class name.

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
Return type:

tuple[str, ...]

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.
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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

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:

str

meta_package_manager.managers.yarn module

class meta_package_manager.managers.yarn.Yarn[source]

Bases: PackageManager

Initialize cli_errors list.

name: str = "Node's yarn"

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://yarnpkg.com'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='macos', name='macOS', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='windows', name='Windows', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.20.0'
► yarn --version
1.22.11
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 global_dir: str

Locate the global directory.

► yarn global dir
~/.config/yarn/global
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 : 

“ “<red>” : Major Update backward-incompatible updates

“ “<yellow>” : Minor Update backward-compatible features

“ “<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. :rtype: Iterator[Package]

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(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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.
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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:

str

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:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.

meta_package_manager.managers.zypper module

class meta_package_manager.managers.zypper.Zypper[source]

Bases: PackageManager

Zypper package manager.

Documentation:

See other command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta

Initialize cli_errors list.

homepage_url: str | None = 'https://en.opensuse.org/Portal:Zypper'

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

platforms: _TNestedSources = frozenset({Platform(id='aix', name='IBM AIX', current=False), Platform(id='altlinux', name='ALT Linux', current=False), Platform(id='amzn', name='Amazon Linux', current=False), Platform(id='android', name='Android', current=False), Platform(id='arch', name='Arch Linux', current=False), Platform(id='buildroot', name='Buildroot', current=False), Platform(id='centos', name='CentOS', current=False), Platform(id='cloudlinux', name='CloudLinux OS', current=False), Platform(id='cygwin', name='Cygwin', current=False), Platform(id='debian', name='Debian', current=False), Platform(id='exherbo', name='Exherbo Linux', current=False), Platform(id='fedora', name='Fedora', current=False), Platform(id='freebsd', name='FreeBSD', current=False), Platform(id='gentoo', name='Gentoo Linux', current=False), Platform(id='guix', name='Guix System', current=False), Platform(id='hurd', name='GNU/Hurd', current=False), Platform(id='ibm_powerkvm', name='IBM PowerKVM', current=False), Platform(id='kvmibm', name='KVM for IBM z Systems', current=False), Platform(id='linuxmint', name='Linux Mint', current=False), Platform(id='mageia', name='Mageia', current=False), Platform(id='mandriva', name='Mandriva Linux', current=False), Platform(id='midnightbsd', name='MidnightBSD', current=False), Platform(id='netbsd', name='NetBSD', current=False), Platform(id='openbsd', name='OpenBSD', current=False), Platform(id='opensuse', name='openSUSE', current=False), Platform(id='oracle', name='Oracle Linux', current=False), Platform(id='parallels', name='Parallels', current=False), Platform(id='pidora', name='Pidora', current=False), Platform(id='raspbian', name='Raspbian', current=False), Platform(id='rhel', name='RedHat Enterprise Linux', current=False), Platform(id='rocky', name='Rocky Linux', current=False), Platform(id='scientific', name='Scientific Linux', current=False), Platform(id='slackware', name='Slackware', current=False), Platform(id='sles', name='SUSE Linux Enterprise Server', current=False), Platform(id='solaris', name='Solaris', current=False), Platform(id='sunos', name='SunOS', current=False), Platform(id='tuxedo', name='Tuxedo OS', current=False), Platform(id='ubuntu', name='Ubuntu', current=True), Platform(id='unknown_linux', name='Unknown Linux', current=False), Platform(id='wsl1', name='Windows Subsystem for Linux v1', current=False), Platform(id='wsl2', name='Windows Subsystem for Linux v2', current=False), Platform(id='xenserver', name='XenServer', current=False)})

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups. Will be normalized into a frozenset of Platform instances at instantiation.

requirement: str | None = '1.14.0'

Minimal required version.

Should be a string parseable by meta_package_manager.version.parse_version.

Defaults to None, which deactivate version check entirely.

pre_args: tuple[str, ...] = ('--no-color', '--no-abbrev', '--non-interactive', '--no-cd', '--no-refresh')
version_regex: str = 'zypper\\s+(?P<version>\\S+)'
► zypper --version
zypper 1.14.11
class SearchResult[source]

Bases: TypedDict

id: str
version: TokenizedString
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
Return type:

Iterator[Package]

install(**kwargs: ~typing.~P) T

Install one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

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
Return type:

tuple[str, ...]

upgrade_one_cli(**kwargs: ~typing.~P) T

Returns the complete CLI to upgrade one package and one only.

Allows a specific version to be provided.

Return type:

TypeVar(T)

sync()[source]

Sync package metadata.

► sudo zypper --no-color --no-abbrev --non-interactive --no-cd                 --no-refresh refresh
Return type:

None

cleanup()[source]

Removes things we don’t need anymore.

► sudo zypper --no-color --no-abbrev --non-interactive --no-cd                 --no-refresh clean
Return type:

None

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. This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

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

id: str = '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.

name: str = 'Zypper'

Return package manager’s common name.

Default value is based on class name.

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.

cli_errors: list[CLIError]

Accumulate all CLI errors encountered by the package manager.