Manual Page Search Parameters

XBPS-UHELPER(1) General Commands Manual XBPS-UHELPER(1)

xbps-uhelperXBPS helper utilities

xbps-uhelper [OPTIONS] ACTION [ARGUMENTS]

The xbps-uhelper utility provides various utilities for interacting with XBPS and XBPS packages.

A binpkg argument is a string of the format , like the filename of a binary package.

A pkgver argument is a string of the format , like the property.

A pkgpattern argument is package expression specifying a package name and version separated by any of the following version comparators:

less than
greater than
less or equal than
greater or equal than

Example: “”.

--config dir
Specifies a path to the XBPS configuration directory. If the first character is not '/' then it's a relative path of rootdir.
--debug
Enables extra debugging shown to stderr.
--help
Show the help message.
--rootdir dir
Specifies a full path for the target root directory.
--verbose
Enables verbose messages.
--version
Show the version information.

Prints the XBPS native arch.
binpkg ...
Prints the arch of binpkg strings.
binpkg ...
Prints the pkgver of binpkg strings.
instver reqver
Compare two pkgver strings, instver (installed) vs reqver (required). See EXIT STATUS for more information. If --verbose is specified, also prints "instver <|=|> reqver".
string ...
Prints the pkgname of pkgpatterns and/or pkgvers. This is a combination of getpkgdepname and getpkgname.
string ...
Prints the version of pkgpatterns and/or pkgvers. This is a combination of getpkgdepversion and getpkgversion.
pkgpattern ...
Prints the pkgname of package dependency patterns.
pkgpattern
Prints the version of package dependency patterns.
pkgver ...
Prints the name of package strings.
pkgver ...
Prints the revision of package strings.
pkgver ...
Prints the version of package strings.
Prints the xbps system directory (<sharedir>/xbps.d).
pkgver pkgpattern
Matches a pkgver with a pkgpattern. See EXIT STATUS for more information. If --verbose is specified, also prints "pkgver matches|does not match pkgpattern", or an error.
pkgname ...
Prints the version of installed real packages.
pkgname ...
Prints the version of installed packages.

The xbps-uhelper utility exits 0 on success, and >0 if an error occurs. A descriptive error message will be printed to stderr. Exceptions to this are:

instver reqver
1
if instver is greater than reqver.
0
if instver is equal to reqver.
255
if instver is less than reqver.
pkgver pkgpattern
1
pkgver matches pkgpattern.
0
pkgver does not match pkgpattern.
255
An error occurred.

Compare package versions:

$ xbps-uhelper cmpver 'foo-1.0_1' 'foo-2.1_1'
$ xbps-uhelper cmpver 1.0 2.1

Get the package name for dependency pattern “foo>=0”:

$ xbps-uhelper getpkgdepname 'foo>=0'

Get the version expression for the dependency pattern “foo>=0”:

$ xbps-uhelper getpkgdepversion 'foo>=0'

Get the package name for pkgver “foo-2.0_1”:

$ xbps-uhelper getpkgname foo-2.0_1

Get the revision for pkgver “foo-2.0_1”:

$ xbps-uhelper getpkgrevision foo-2.0_1

Get the version for pkgver “foo-2.0_1”:

$ xbps-uhelper getpkgversion foo-2.0_1

Check if the pkgver “foo-1.0_1” matches the dependency pattern “foo>=1.0”:

$ xbps-uhelper pkgmatch foo-1.0_1 'foo>=1.0'

Get the version for the installed package “foo”:

$ xbps-uhelper version foo

Get the names of packages from a list of pkgvers:

$ xbps-query -Rp pkgver -s foo | cut -d: -f1 | xargs xbps-uhelper getpkgname

Get the names of dependencies for a package:

$ xbps-query -Rp run_depends xf86-video-amdgpu | xargs xbps-uhelper getname

Overrides uname(2) machine result with this value. Useful to install packages with a fake architecture.
Sets the target architecture to this value. This variable differs from XBPS_ARCH in that it allows you to install packages partially, because configuration phase is skipped (the target binaries might not be compatible with the native architecture).

/etc/xbps.d
Default configuration directory.
/usr/share/xbps.d
Default system configuration directory.
/var/db/xbps/.<pkgname>-files.plist
Package files metadata.
/var/db/xbps/pkgdb-0.38.plist
Default package database (0.38 format). Keeps track of installed packages and properties.
/var/cache/xbps
Default cache directory to store downloaded binary packages.

xbps-checkvers(1), xbps-create(1), xbps-dgraph(1), xbps-digest(1), xbps-fbulk(1), xbps-fetch(1), xbps-install(1), xbps-pkgdb(1), xbps-query(1), xbps-reconfigure(1), xbps-remove(1), xbps-rindex(1), xbps-uchroot(1), xbps-uunshare(1), xbps.d(5)

Juan Romero Pardines <xtraeme@gmail.com>

Report bugs at https://github.com/void-linux/xbps/issues

February 11, 2023 x86_64