portmod
CLI Package manager designed for packaging game mods
usage: portmod [-h] [-q] [-v] [--no-confirm] [--version]
{<example>,mirror,init,sync} ...
Positional Arguments
- subcommand_name
Possible choices: <example>, mirror, init, sync
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
- --version
Displays the version number of Portmod.
Sub-commands:
<example>
Interact with the <example> prefix
portmod <example> [-h] [-q] [-v] [--no-confirm]
{merge,search,select,query,use,info,validate,destroy,run,cfg-update}
...
Positional Arguments
- prefix_subcommand_name
Possible choices: merge, search, select, query, use, info, validate, destroy, run, cfg-update
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
Sub-commands:
merge
Install or remove packages
Packages passed as arguments will always be installed (or re-installed) unless the --update
flag is used, and will be selected (tracked as explicitly installed and not removed unless explicitly removed) unless the --oneshot
flag is used.
Package changes are displayed using a transaction list of the following form:
[XX] category/package-name USE="flag -disabled-flag"
- X is a placeholder for one of the following:
f fetch-restricted, but already available in the download cache
F fetch-restricted, but unavailable in the download cache (must be downloaded manually)
N (new) indicates the package was not previously installed
R (reinstall) indicates that the same version of the package is being re-installed.
U (update) indicates that the package is being updated to new version
D (downgrade) indicates that the package is being downgraded to an older version
d (delete) indicates that the package is being removed
- USE flags:
Enabled flags are displayed bold red.
Disabled flags are displayed blue.
Flags which have changed since the last time the package was installed are displayed bold green.
Flags in use expand categories are displayed in the form CATEGORY=”flag” (for the flag ‘category_flag’)
portmod <example> merge [-h] [-q] [-v] [--no-confirm] [--ignore-default-opts]
[-c] [-x] [-C] [-1] [-O] [-u] [-n] [-N] [-e] [-D]
[-w [Yes/No]] [--deselect [Yes/No]] [--debug]
[ATOM | ARCHIVE | @SET ...]
Positional Arguments
- ATOM | ARCHIVE | @SET
Packages to install. Can be either a package atom (“category/name”) set (“@set_name”) or source archive path (“path/to/archive.ext”). If an archive path is passed as an argument, portmod will search for matching archives used by packages it is aware of. Portmod cannot install from arbitrary archives.
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
- --ignore-default-opts
Causes the OMWMERGE_DEFAULT_OPTS environment variable to be ignored
- -c, --depclean
Removes packages and their dependencies. Packages dependent on the given packages will also be removed. If no arguments are given, this will remove packages that aren’t needed by other packages and aren’t in the world file or system set.
- -x, --auto-depclean
Automatically remove unneeded dependencies before finishing. Equivalent to running portmod <prefix> merge –depclean after other operations.
- -C, --unmerge
Removes the given packages without checking dependencies.
- -1, --oneshot
Do not make any changes to the world set when installing or removing packages
- -O, --nodeps
Ignore dependencies when installing specified packages. Note: This may cause packages to fail to install if their build dependencies aren’t satisfied, and fail to work if their runtime dependencies aren’t satisfied.
- -u, --update
Updates packages to the best version available and excludes packages if they are already up to date.
- -n, --noreplace
This option has been merged into –update and is now deprecated.
- -N, --newuse
This option has been merged into –update and is now deprecated.
- -e, --emptytree
Reinstalls target packages and their entire deep dependency tree, as if no packages are currently installed.
- -D, --deep
Consider the entire dependency tree when doing updates instead of just the packages specified on the command line.
- -w, --select
Adds specified packages to the world set (unused. This is the default if deselect is not provided).
- --deselect
Removes specified packages from the world set. This is implied by uninstall actions such as –depclean and –unmerge. Use –deselect=n to prevent uninstalls from removing packages from the world set.
- --debug
Skips the cleanup stage after installation so that the contents of temporary directories can be inspected. Note that you will need to clean up leftover files manually.
search
Searches the repository for packages with a name or atom matching the given search terms
portmod <example> search [-h] [-q] [-v] [--no-confirm] QUERY [QUERY ...]
Positional Arguments
- QUERY
Search query phrases to match against
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
select
Select between configuration options
portmod <example> select [-h] [-q] [-v] [--no-confirm] {profile,news,repo} ...
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
Sub-commands:
Manage the profile symlink
portmod <example> select profile [-h] [-q] [-v] [--no-confirm]
{list,set,show} ...
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
List available profiles
portmod <example> select profile list [-h]
Set a new profile symlink target
portmod <example> select profile set [-h] NUMBER
- NUMBER
Profile number
Show the current profile symlink target
portmod <example> select profile show [-h]
Manage news
portmod <example> select news [-h] [-q] [-v] [--no-confirm]
{list,read,unread} ...
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
List all news articles
portmod <example> select news list [-h] [-q] [-v] [--no-confirm]
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
Displays news article and marks as read
portmod <example> select news read [-h] [-q] [-v] [--no-confirm] [<item>]
- <item>
new (default) all or item number
Default: “new”
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
Marks news article as unread
portmod <example> select news unread [-h] [-q] [-v] [--no-confirm] <item>
- <item>
all or item number
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
Configure the repositories associated with this prefix
portmod <example> select repo [-h] [-q] [-v] [--no-confirm]
{list,add,remove} ...
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
List available package repositories
portmod <example> select repo list [-h]
Add a package repository to this prefix
portmod <example> select repo add [-h] REPO
- REPO
Identifier for the repository. Either the repository name, or its index in the list.
Remove a package repository from this prefix
portmod <example> select repo remove [-h] REPO
- REPO
Identifier for the repository. Either the repository name, or its index in the list.
query
Query information about packages
portmod <example> query [-h] [-q] [-v] [--no-confirm] [-a]
{list,depends,has,hasuse,uses,meta,depgraph,vfsfind,vfslist}
...
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
- -a, --all
Also query packages which are not installed
Sub-commands:
List all packages matching ATOM.
By default only lists installed packages.
Produces output in the form of:
[IR] category/package-version
The Presence of the I flag indicates that the package is installed The Presence of the R flag indicates that the package is available in a repository
portmod <example> query list [-h] [-r] ATOM | @SET [ATOM | @SET ...]
- ATOM | @SET
Atoms specifying the packages to list
- -r, --remote
If specified, also list packages in the remote repositories
List all packages directly depending on ATOM
portmod <example> query depends [-h] ATOM
- ATOM
Package atom to query
List all packages matching variable.
This can only be used to scan variables in the base Pybuild spec, not custom fields declared by specific Pybuilds or their superclasses.
portmod <example> query has [-h] [--invert] FIELD [VALUE]
- FIELD
Pybuild field to search
- VALUE
Value to match in field
Default: “”
- --invert
Unknown localization query-has-invert-help
List all packages that declare the given use flag.
Note that this only includes those with the flag in their IUSE field and inherited flags through IUSE_EFFECTIVE will not be counted
portmod <example> query hasuse [-h] FLAG
- FLAG
Use flag to match against
Display use flags and their descriptions
portmod <example> query uses [-h] ATOM
- ATOM
Atom specifying the package whose flags are to be displayed
Display metadata for a package
portmod <example> query meta [-h] ATOM
- ATOM
Atom specifying the package whose metadata is to be displayed
Display dependency graph for package
portmod <example> query depgraph [-h] [--depth DEPTH] ATOM
- ATOM
Unknown localization package-depgraph-atom-help
- --depth
Maximum depth of the tree to be displayed. Default is 10
Display the full path of the given file/directory in the VFS
portmod <example> query vfsfind [-h] name
- name
Display the full path of the given file/directory in the VFS
Display the contents of the given directory in the VFS
portmod <example> query vfslist [-h] [directory_path]
- directory_path
Display the contents of the given directory in the VFS
use
Enable and disable use flags
portmod <example> use [-h] [-q] [-v] [--no-confirm] [-E FLAG] [-D FLAG]
[-R FLAG] [-p ATOM]
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
- -E
Enable use flag
- -D
Explicitly disable use flag
- -R
Remove references to the given use flag (enabled or disabled)
- -p
Package atom for setting local use flag. If not set, enables/disables global use flags.
info
Displays the values of several global variables for debugging purposes.
portmod <example> info [-h] [-q] [-v] [--no-confirm]
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
validate
Check if the packages in the package directory are installed, and that the directories in the config all exist.
portmod <example> validate [-h] [-q] [-v] [--no-confirm]
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
destroy
Destroy this prefix
portmod <example> destroy [-h] [-q] [-v] [--no-confirm] [--preserve-root]
[--remove-config]
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
- --preserve-root
Don’t remove the prefix ROOT when destroyign the prefix (removed by default)
- --remove-config
Remove the prefix config directory when destroyign the prefix (not removed by default)
run
Run commands within the sandbox for the prefix
portmod <example> run [-h] [-q] [-v] [--no-confirm] COMMAND [COMMAND ...]
Positional Arguments
- COMMAND
Command to execute. If the command contains arguments beginning with “-“, then it must be prefixed with – to separate it from the arguments to portmod.
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
cfg-update
Runs module updates and prompts for pending updates to protected config files.
portmod <example> cfg-update [-h] [-q] [-v] [--no-confirm]
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
mirror
Update a local mirror
portmod mirror [-h] [-q] [-v] [--no-confirm] DIRECTORY
Positional Arguments
- DIRECTORY
Directory to mirror into
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
init
Create a new prefix
portmod init [-h] [-q] [-v] [--no-confirm] PREFIX arch [DIRECTORY]
Positional Arguments
- PREFIX
Prefix name which will be used in commands that interact with the prefix
- arch
Game engine Architecture of the prefix
- DIRECTORY
Directory in which to create the prefix. If omitted, portmod will create the prefix within a new directory in /tmp/portmod.test/local.
If files already exist in the directory, they will be left alone to allow portmod to work with existing game data. Portmod may install over top of these files, however the original versions will be preserved and restored if the package overwriting those files is removed, or the prefix is removed.
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.
sync
Fetch and update remote package repositories
portmod sync [-h] [-q] [-v] [--no-confirm] [repository ...]
Positional Arguments
- repository
Repositories to sync. If omitted, all repositories in repos.cfg will be synched.
Named Arguments
- -q, --quiet
Don’t display anything but the most important information.
- -v, --verbose
Increase verbosity of output.
- --no-confirm
Don’t prompt for confirmation and always select the default option instead.