Xbps Operations

Manage XBPS packages and repositories. Note that XBPS package names are case-sensitive.

Facts used in these operations: xbps.XbpsPackages.

xbps.packages

Install/remove/update XBPS packages.

xbps.packages(packages=None, present=True, update=False, upgrade=False)
  • packages: list of packages to ensure
  • present: whether the packages should be installed
  • update: run xbps-install -S before installing packages
  • upgrade: run xbps-install -y -u before installing packages

Example:

xbps.packages(
    name="Install Vim and Vim Pager",
    packages=["vimpager", "vim"],
)

xbps.update

Stateless operation

This operation will always execute commands and is not idempotent.

Update XBPS repositories.

xbps.update()

xbps.upgrade

Stateless operation

This operation will always execute commands and is not idempotent.

Upgrades all XBPS packages.

xbps.upgrade()