meta_package_manager.managers.eopkg module¶

class meta_package_manager.managers.eopkg.EOPKG[source]¶

Bases: PackageManager

Solus’ eopkg package manager, a PiSi fork.

installed and outdated parse eopkg’s fixed-width, |-delimited status table; the column regex requires that pipe structure, so the header and === separator rows fall through. --no-color is forced to keep the output free of ANSI escapes.

Mutating operations pass --yes-all to auto-confirm eopkg’s prompts so they run unattended.

Note

eopkg 4.x and 5.x ship as a Nuitka onefile bundle, and the Python each carries reads its stdout encoding from the locale alone. Under C or POSIX that encoding is ascii. The first summary holding a character it cannot encode then aborts the command with Error: System error. Program terminated. and exit 1, after a truncated listing. list-upgrades and list-available write every summary raw, so either Cap’n Proto or ImageMagick® stops them; search escapes ® but not ’, so only the first stops it.

No extra_env pins the locale here, because mpm never reaches that state. PEP 538 coercion exports LC_CTYPE=C.UTF-8 from mpm’s own interpreter, and eopkg inherits it. A shell exports nothing, which is why the same command fails by hand and works through mpm. Measured on Solus 4.9, against eopkg 4.4.0 and 5.0.0 alike.

Initialize cli_errors list.

name: str = 'Solus eopkg'¶

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.

Slug of the brand mark standing for this manager in the documentation.

Names an SVG vendored under docs/assets/managers/, whose provenance and license are recorded in docs/assets/managers/logos.yaml. Inlined at the top of the manager’s page by meta_package_manager._docs; a manager leaving it unset keeps the page’s default package glyph.

Several managers legitimately share one slug, either because they wrap the same upstream (brew and cask) or because the tool has no mark of its own and its ecosystem’s stands in (apt under Debian’s swirl, cargo under Rust’s gear). Documentation-only, like homepage_url: no CLI output reads it.

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

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

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

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

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

List of platforms supported by the manager.

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

default_sudo: bool = True¶

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

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

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

Version requirement specifier.

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

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

pre_args: tuple[str, ...] = ('--no-color',)¶
version_regexes: tuple[str, ...] = ('eopkg(?:\\.bin)?\\s+(?P<version>\\S+)',)¶

eopkg 5.0.0 names itself eopkg.bin in its banner, so the pattern makes that suffix optional. Without it nothing matches, no version is detected, and the manager silently leaves the pool on every Solus host running 5.x.

The name is fixed, not read from argv[0]: /usr/bin/eopkg and /usr/bin/eopkg-cli are both symlinks to eopkg.bin, and all three spellings print the same banner.

$ eopkg --version
eopkg.bin 5.0.0
$ eopkg --version
eopkg 4.4.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|     9|   Solus|07 Sep 2026 10:08
abseil-cpp            | i|     20260107.1|    11|   Solus|07 Sep 2026 10:08
accounts-qml-module   | i|            0.7|     6|   Solus|07 Sep 2026 10:08
accountsservice       | i|        23.13.9|    38|   Solus|07 Sep 2026 10:08
acl                   | i|          2.3.2|    22|   Solus|07 Sep 2026 10:08
alsa-firmware         | i|          1.2.4|     8|   Solus|07 Sep 2026 10:08
alsa-lib              | i|         1.2.14|    41|   Solus|07 Sep 2026 10:08
alsa-plugins          | i|         1.2.12|    26|   Solus|07 Sep 2026 10:08
alsa-ucm-conf         | i|         1.2.13|     1|   Solus|07 Sep 2026 10:08
alsa-utils            | i|         1.2.13|    29|   Solus|07 Sep 2026 10:08
anthy                 | i|          9100h|     4|   Solus|07 Sep 2026 10:08
aom                   | i|         3.12.1|    26|   Solus|07 Sep 2026 10:08
appstream             | i|          1.1.2|    17|   Solus|07 Sep 2026 10:08
appstream-catalog     | i|       20260417|    52|   Solus|07 Sep 2026 10:08
appstream-qt6         | i|          1.1.2|    17|   Solus|07 Sep 2026 10:08
argon2                | i|       20190702|     6|   Solus|07 Sep 2026 10:08

The listing carries no footer: its last line is a package, so every line after the two header rows is one. A package whose name overflows the first column pushes the pipe right instead of being truncated, which is why the regex anchors on the pipes rather than on fixed offsets.

property outdated: Iterator[Package]¶

Fetch outdated packages.

Two queries, because one cannot answer both halves. list-upgrades names what is outdated but --install-info describes each package as installed, so its version column is the current one and the upgrade target appears nowhere. info holds the target, and it takes every package name at once, so the whole listing costs one extra invocation rather than one per package.

Both sides are reported as {version}-:release:`, the pair eopkg builds its package files from (`htop-3.5.3-30-1-x86_64.eopkg). A bare version would hide the release, and a release-only rebuild is a real upgrade that would then read as the same version on both sides. This is the one operation where that matters, which is why installed above still reports the bare version: changing it would rewrite the version string every snapshot carries.

$ eopkg --no-color list-upgrades --install-info
Package Name          |St|        Version|  Rel.|  Distro|             Date
===========================================================================
acl                  | i|          2.3.2|    22|   Solus|07 Sep 2026 10:08
alsa-lib             | i|         1.2.14|    41|   Solus|07 Sep 2026 10:08
alsa-ucm-conf        | i|         1.2.13|     1|   Solus|07 Sep 2026 10:08
alsa-utils           | i|         1.2.13|    29|   Solus|07 Sep 2026 10:08
anthy                | i|          9100h|     4|   Solus|07 Sep 2026 10:08
aom                  | i|         3.12.1|    26|   Solus|07 Sep 2026 10:08
appstream            | i|          1.1.2|    17|   Solus|07 Sep 2026 10:08

info prints an Installed package: section before the repository one whenever the package is installed, and both open on an identically shaped Name : line. That is why _CANDIDATE_REGEXP anchors on the repository heading rather than on the field name. The block below shows a package that is not installed, so only the repository half appears:

$ eopkg --no-color info htop
htop package is not installed
Package found in Solus repository:
Name                : htop, version: 3.5.3, release: 30
Summary             : htop (interactive process viewer for Linux)
Description         : htop is an interactive process viewer for Linux.
Licenses            : GPL-2.0-or-later
Component           : system.utils
Dependencies        : ncurses glibc libcap2 lm_sensors
Distribution        : Solus, Dist. Release: 1
Architecture        : x86_64, Installed Size: 397.03 KB, Package Size: 159.05
                      KB
Reverse Dependencies: htop-dbginfo
search(query, extended, exact)[source]¶

Fetch matching packages.

Caution

Search does not supports exact matching.

Naked search without parameters is the same as extended search with all filtering parameters (i.e. --name --summary --description):

$ eopkg --no-color search firefox
gjs-dbginfo                 - Debug symbols for gjs
bleachbit                   - BleachBit frees disk space and maintains privacy
firefox                     - Firefox web browser
eid-mw-firefox              - Belgian eID add-on for Mozilla Firefox
gjs                         - GNOME JavaScript
font-fira-ttf               - Mozilla's new typeface, used in Firefox OS
geckodriver                 - WebDriver for Firefox
firefox-dbginfo             - Debug symbols for firefox
nvidia-vaapi-driver-dbginfo - Debug symbols for nvidia-vaapi-driver
font-clear-sans-ttf         - Clear Sans Fonts - TrueType
gjs-devel                   - Development files for gjs
geckodriver-dbginfo         - Debug symbols for geckodriver

$ eopkg --no-color search firefox --name --summary --description
gjs-dbginfo                 - Debug symbols for gjs
bleachbit                   - BleachBit frees disk space and maintains privacy
firefox                     - Firefox web browser
eid-mw-firefox              - Belgian eID add-on for Mozilla Firefox
gjs                         - GNOME JavaScript
font-fira-ttf               - Mozilla's new typeface, used in Firefox OS
geckodriver                 - WebDriver for Firefox
firefox-dbginfo             - Debug symbols for firefox
nvidia-vaapi-driver-dbginfo - Debug symbols for nvidia-vaapi-driver
font-clear-sans-ttf         - Clear Sans Fonts - TrueType
gjs-devel                   - Development files for gjs
geckodriver-dbginfo         - Debug symbols for geckodriver

For default search on package name only, we rescript filtering to --name only:

$ eopkg --no-color search --name htop
htop            - htop (interactive process viewer for Linux)
htop-dbginfo    - Debug symbols for htop
neohtop         - Blazing-fast system monitoring for your desktop.
neohtop-dbginfo - Debug symbols for neohtop

Summaries reach this listing exactly as the repository index stores them, character references included, where list-available resolves the same text. So imagemagick describes itself as ImageMagick&#xAE; suite here and ImageMagick® suite there, and html.unescape() reconciles the two. Measured against eopkg 4.4.0.

$ eopkg --no-color search --name imagemagick
imagemagick         - ImageMagick&#xAE; suite to create, edit, compose, or convert bitmap images
imagemagick-dbginfo - Debug symbols for imagemagick
imagemagick-devel   - Development files for imagemagick
imagemagick-docs    - Documentation for imagemagick
Return type:

Iterator[Package]

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

Install one package.

$ sudo eopkg --no-color install --yes-all htop
Total size of package(s): 159.05 KB
Downloading 1 package resources (0 cached)
Downloaded htop-3.5.3-30-1-x86_64.eopkg
Finished downloading packages.
Disabling keyboard interrupts for file operations.
Installing 1 / 1
Installing htop, version 3.5.3, release 30

Extracting the files of htop (100%) [complete]
Installed htop
Return type:

str

upgrade_all_cli()[source]¶

Generates the CLI to upgrade all outdated packages.

$ sudo eopkg --no-color upgrade --yes-all
Return type:

tuple[str, ...]

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

Generates the CLI to upgrade the provided package.

$ sudo eopkg --no-color upgrade --yes-all bash
Updating repositories
Updating repository: Solus
Disabling keyboard interrupts for file operations.
Downloaded eopkg-index.xml.xz.sha1sum

Solus repository information is up-to-date.
No packages to upgrade.
Return type:

tuple[str, ...]

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

List of CLI names the package manager is known as.

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

..hint::

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

remove(package_id)[source]¶

Remove one package.

$ sudo eopkg --no-color remove --yes-all htop
The following list of packages will be removed
in the respective order to satisfy dependencies:
htop
Disabling keyboard interrupts for file operations.
Removing package htop
Removed htop
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.

sync()[source]¶

Sync package metadata.

$ sudo eopkg --no-color update-repo
Updating repository: Solus
Disabling keyboard interrupts for file operations.
Downloaded eopkg-index.xml.xz.sha1sum

Solus repository information is up-to-date.
Return type:

None

cleanup_cache()[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
The following list of packages will be removed
in the respective order to satisfy dependencies:
flashrom libboost celt
Disabling keyboard interrupts for file operations.
Removing package flashrom
Removed flashrom
Removing package libboost
Removed libboost
Removing package celt
Removed celt

clean releases stale transaction locks and prints nothing when none are held, which is its usual outcome.

$ sudo eopkg --no-color clean
$ sudo eopkg --no-color delete-cache
Cleaning package cache /var/cache/eopkg/packages...
Cleaning source archive cache /var/cache/eopkg/archives...
Cleaning temporary directory /var/eopkg...
Removing cache file /var/cache/eopkg/groupdb.cache...
Removing cache file /var/cache/eopkg/installdb.cache...
Removing cache file /var/cache/eopkg/packagedb.cache...
Return type:

None