meta_package_manager.managers.tazpkg module¶
- class meta_package_manager.managers.tazpkg.Tazpkg[source]¶
Bases:
PackageManagerSliTaz GNU/Linux’s package manager.
Documentation:
Note
tazpkg decorates every listing with localized, colorized titles, separators and count footers, with no terminal detection:
LC_ALL=Cpins the text to English,--output=rawswitches the decorations to plain text, and any remaining ANSI sequence is stripped before parsing. Data rows are then matched by their digit-led version column, which no decoration line carries.Note
No
outdatedoperation:tazpkg up --checkrequires root and recharges the package lists from the mirror even when only listing, so there is no cleanly read-only upgradable listing.Initialize
cli_errorslist.- maintenance_note: str | None = '[SliTaz](https://slitaz.org) has published no stable ISO since 5.0 (2023) but shows active development into 2026; `tazpkg` remains its native package manager.'¶
A watch note about a still-maintained upstream whose activity is slowing or whose status is ambiguous, as a MyST markdown block.
Unlike
unmaintained, this is purely informational: the manager stays in the default selection and in the test matrices. It renders as a{note}admonition atop the manager’s documentation page, flagging upstreams worth keeping an eye on (a slow release cadence, superseded-but-still-shipped tools, a discontinued platform still under vendor support). May embed markdown links. Mutually exclusive withunmaintained: a confirmed-dead manager carries anunmaintained_messageinstead. Enforced bytest_maintenance_note.
- homepage_url: str | None = 'https://slitaz.org'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='slitaz', name='SliTaz GNU/Linux')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a
frozensetofPlatforminstances at instantiation.
- default_sudo: bool = True¶
Built-in escalation default, used when
sudoisNone.Falseon the base: most managers install into user-writable trees and never need root. The system package managers whose privileged operations require root (apt,dnf,pacman,zypper, …) set this toTrueso theirbuild_cli(..., sudo=True)operations escalate out of the box, while staying switchable off throughsudo(--no-sudoor config) for rootless setups.
- extra_env: ClassVar = {'LC_ALL': 'C'}¶
Additional environment variables to add to the current context.
Automatically applied on each
meta_package_manager.execution.CLIExecutor.run_cli()calls.
- post_args: tuple[str, ...] = ('--output=raw',)¶
Global list of options used before and after the invoked package manager CLI.
Automatically added to each
meta_package_manager.execution.CLIExecutor.run_cli()call.Essentially used to force silencing, low verbosity or no-color output.
- version_cli: str | None = 'awk'¶
tazpkg has no version command at all: its own version only exists as the
tazpkgrow of the installed-packages database. This probe mirrors, verbatim, how tazpkg resolves itsVERSIONvariable for itself:export VERSION=$(awk -F$'\t' '$1=="tazpkg"{print $2}' \ "$PKGS_DB/installed.info")
- version_cli_options: tuple[str, ...] = ('-F\t', '$1=="tazpkg"{print $2}', '/var/lib/tazpkg/installed.info')¶
CLI options used to produce the version of the package manager.
The raw output produced by the package manager CLI will be parsed with the
version_regexesbelow to extract the version number.
- version_regexes: tuple[str, ...] = ('^(?P<version>[\\d.]+)$',)¶
A bare integer Mercurial revision on cooking releases (
944) or a dotted version on stable ones (4.9.2).
- property installed: Iterator[Package]¶
Fetch installed packages.
$ tazpkg list --output=raw List of all installed packages ================================================================================ busybox 1.36.0 base-system nano 6.2 editors ================================================================================ 2 packages installed.
- search(query, extended, exact)[source]¶
Fetch matching packages.
tazpkg matches the query as a case-insensitive substring of
name-version, over installed then mirrored packages.$ tazpkg search nano --output=raw Installed packages -------------------------------------------------------------------------------- nano 6.2 editors -------------------------------------------------------------------------------- 1 installed package found for: nano
- install(package_id, version=None)[source]¶
Install one package from the mirror.
--forcedskips the already-installed guard, keeping the call non-interactive.$ sudo tazpkg get-install nano --forced --output=raw
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all packages.
-i(no long form) auto-confirms, upgrading every outdated package; the command recharges the package lists first.$ sudo tazpkg up -i --output=raw
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade one package.
tazpkg has no per-package upgrade verb: its own upgrade loop re-runs
get-install --forcedon each outdated package.$ sudo tazpkg get-install nano --forced --output=raw
- cli_names: tuple[str, ...] = ('tazpkg',)¶
List of CLI names the package manager is known as.
This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.
- ..hint::
This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named
pythonorpython3.
By default, this property’s value is derived from the manager’s ID (see the
MetaPackageManager.__init__method above).
- id: str = 'tazpkg'¶
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.
No
--autoon purpose: it would also auto-confirm the “remove dependents?” follow-up and cascade. On a non-terminal stdout (mpm’s subprocess pipe) the(y/N)prompt is skipped and only the target package is removed.$ sudo tazpkg remove nano --output=raw
- Return type:
- virtual: bool = False¶
Should we expose the package manager to the user?
Virtual package manager are just skeleton classes used to factorize code among managers of the same family.