XBPS Library API 20240111
The X Binary Package System
Functions
Package orphans handling functions

Functions

xbps_array_t xbps_find_pkg_orphans (struct xbps_handle *xhp, xbps_array_t orphans)
 

Detailed Description

Functions to find installed package orphans.

Package orphans were installed automatically by another package, but currently no other packages are depending on.

The following image shown below shows the registered packages database dictionary (the array returned by xbps_find_pkg_orphans() will contain a package dictionary per orphan found):

Legend:

Text inside of white boxes are the key associated with the object, its data type is specified on its edge, i.e array, bool, integer, string, dictionary.

Function Documentation

◆ xbps_find_pkg_orphans()

xbps_array_t xbps_find_pkg_orphans ( struct xbps_handle xhp,
xbps_array_t  orphans 
)

Finds all package orphans currently installed.

Parameters
[in]xhpPointer to an xbps_handle struct.
[in]orphansProplib array of strings with package names of packages that should be treated as they were already removed (optional).
Returns
A proplib array of dictionaries with all orphans found, on error NULL is returned and errno is set appropiately.

Definition at line 63 of file package_orphans.c.

References xbps_handle::pkgdb, xbps_pkgdb_get_pkg(), xbps_pkgdb_get_pkg_fulldeptree(), and xbps_pkgdb_get_pkg_revdeps().

Referenced by xbps_transaction_autoremove_pkgs(), and xbps_transaction_remove_pkg().

Here is the call graph for this function:
Here is the caller graph for this function: