meta_package_manager.managers.sun_tools module¶
- class meta_package_manager.managers.sun_tools.Sun_Tools[source]¶
Bases:
PackageManagerSolaris’ legacy System V Release 4 packaging tools.
Documentation:
The suite spans several binaries:
pkginfo(the read-only query tool, used as the main CLI),pkgaddandpkgrm.Note
SVR4 packages come from local media or datastream files, not a network repository: there is no catalog to search, refresh or diff against, and
pkgaddinstalls a specific local artifact rather than resolving a name. Onlyinstalledandremoveare therefore implemented; Solaris 11’s modern repository-based interface is IPS (pkg), a different manager.Initialize
cli_errorslist.- maintenance_note: str | None = 'The SVR4 packaging commands are legacy, superseded by IPS since Solaris 11, but still shipped and supported on [Oracle Solaris 11.4](https://docs.oracle.com/cd/E37838_01/html/E61051/pkgsvr4.html), whose support runs through 2037.'¶
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.
- name: str = 'Solaris SVR4 package tools'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://docs.oracle.com/cd/E86824_01/html/E54763/pkginfo-1.html'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='solaris', name='Solaris')})¶
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.
- cli_names: tuple[str, ...] = ('pkginfo',)¶
List of CLI names the package manager is known as.
This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.
- ..hint::
This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named
pythonorpython3.
By default, this property’s value is derived from the manager’s ID (see the
MetaPackageManager.__init__method above).
- cli_search_path: tuple[str, ...] = ('/usr/sbin',)¶
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.execution.CLIExecutor.cli_pathworks well on all platforms.
- version_cli: str | None = 'uname'¶
None of the SVR4 tools has a version flag:
pkginfo -vmatches a package version andpkgadd/pkgrmonly take-vas verbose. The suite ships with the base system, so its version is the OS release reported byuname -r(5.11on Solaris 11).
- version_cli_options: tuple[str, ...] = ('-r',)¶
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.
- id: str = 'sun-tools'¶
Package manager’s ID.
Derived by defaults from the lower-cased class name in which underscores
_are replaced by dashes-.This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.
- property installed: Iterator[Package]¶
Fetch installed packages.
Plain
pkginfoprints no version column (only category, package instance and name), so the long-llisting is parsed instead: each package is a multi-line block carryingPKGINST:,VERSION:andSTATUS:fields. Only completely-installed packages are yielded.$ pkginfo -l PKGINST: SUNWcar NAME: Core Architecture, (Root) CATEGORY: system ARCH: i386.i86pc VERSION: 11.10.0,REV=2005.01.21.16.34 BASEDIR: / VENDOR: Oracle Corporation STATUS: completely installed