libalpm_depends(3)

πŸ“¦
version 7.1.0.r9.g54d9411 Β· 4 versions
, in arch rolling, fedora 44

πŸ’– libalpm_depends(3) πŸ’–

okay bestie, gather round 🫢 this is libalpm_depends, living in the libalpm Library Functions Manual, section 3 (that's the library-functions girlies, very coder of her). It's the whole dependency-and-conflict corner of libalpm, and honestly? it's giving main character energy. Let's get into it ✨


πŸŽ€ NAME πŸŽ€

libalpm_depends β€” Dependency

  • Functions dealing with libalpm's dependency and conflict information.

🌈 SYNOPSIS 🌈

πŸ¦‹ Data Structures

  • struct alpm_depend_t β€” The basic dependency type.
  • struct alpm_depmissing_t β€” Missing dependency.
  • struct alpm_conflict_t β€” A conflict that has occurred between two packages.
  • struct alpm_fileconflict_t β€” File conflict.

πŸ¦‹ Enumerations

  • enum alpm_depmod_t { ALPM_DEP_MOD_ANY = 1, ALPM_DEP_MOD_EQ, ALPM_DEP_MOD_GE, ALPM_DEP_MOD_LE, ALPM_DEP_MOD_GT, ALPM_DEP_MOD_LT } β€” Types of version constraints in dependency specs.
  • enum alpm_fileconflicttype_t { ALPM_FILECONFLICT_TARGET = 1, ALPM_FILECONFLICT_FILESYSTEM } β€” File conflict type.

πŸ¦‹ Functions

  • alpm_list_t * alpm_checkdeps (alpm_handle_t *handle, alpm_list_t *pkglist, alpm_list_t *remove, alpm_list_t *upgrade, int reversedeps) β€” Checks dependencies and returns missing ones in a list.
  • alpm_pkg_t * alpm_find_satisfier (alpm_list_t *pkgs, const char *depstring) β€” Find a package satisfying a specified dependency.
  • alpm_pkg_t * alpm_find_dbs_satisfier (alpm_handle_t *handle, alpm_list_t *dbs, const char *depstring) β€” Find a package satisfying a specified dependency.
  • alpm_list_t * alpm_checkconflicts (alpm_handle_t *handle, alpm_list_t *pkglist) β€” Check the package conflicts in a database.
  • char * alpm_dep_compute_string (const alpm_depend_t *dep) β€” Returns a newly allocated string representing the dependency information.
  • alpm_depend_t * alpm_dep_from_string (const char *depstring) β€” Return a newly allocated dependency information parsed from a string should be used to free the dependency .
  • void alpm_dep_free (alpm_depend_t *dep) β€” Free a dependency info structure.
  • void alpm_fileconflict_free (alpm_fileconflict_t *conflict) β€” Free a fileconflict and its members.
  • void alpm_depmissing_free (alpm_depmissing_t *miss) β€” Free a depmissing and its members.
  • void alpm_conflict_free (alpm_conflict_t *conflict) β€” Free a conflict and its members.

πŸ’œ Detailed Description πŸ’œ

Functions dealing with libalpm's dependency and conflict information.

That's literally the whole vibe. This page is your one-stop for "who needs what, who clashes with who, and how do I free all of it before I leak memory like it's an ex's texts" πŸ’…


🌸 Data Structure Documentation 🌸

struct alpm_depend_t

The basic dependency type.

This type is used throughout libalpm, not just for dependencies but also conflicts and providers.

Data Fields:

  • char * desc β€” A description of why this dependency is needed (optional).
  • alpm_depmod_t mod β€” How the version should match against the provider.
  • char * name β€” Name of the provider to satisfy this dependency.
  • unsigned long name_hash β€” A hash of name (used internally to speed up conflict checks).
  • char * version β€” Version of the provider to match against (optional).

struct alpm_depmissing_t

Missing dependency.

Data Fields:

  • char * causingpkg β€” If the depmissing was caused by a conflict, the name of the package that would be installed, causing the satisfying package to be removed.
  • alpm_depend_t * depend β€” The dependency that was wanted.
  • char * target β€” Name of the package that has the dependency.

struct alpm_conflict_t

A conflict that has occurred between two packages.

Data Fields:

  • alpm_pkg_t * package1 β€” The first package.
  • alpm_pkg_t * package2 β€” The second package.
  • alpm_depend_t * reason β€” The conflict.

struct alpm_fileconflict_t

File conflict.

A conflict that has happened due to a two packages containing the same file, or a package contains a file that is already on the filesystem and not owned by that package.

Data Fields:

  • char * ctarget β€” The name of the package that also owns the file if there is one.
  • char * file β€” The name of the file that the package conflicts with.
  • char * target β€” The name of the package that caused the conflict.
  • alpm_fileconflicttype_t type β€” The type of conflict.

🌈 Enumeration Type Documentation 🌈

enum alpm_depmod_t

Types of version constraints in dependency specs.

Enumerator:

  • ALPM_DEP_MOD_ANY β€” No version constraint.
  • ALPM_DEP_MOD_EQ β€” Test version equality (package=x.y.z).
  • ALPM_DEP_MOD_GE β€” Test for at least a version (package>=x.y.z).
  • ALPM_DEP_MOD_LE β€” Test for at most a version (package<=x.y.z).
  • ALPM_DEP_MOD_GT β€” Test for greater than some version (package>x.y.z).
  • ALPM_DEP_MOD_LT β€” Test for less than some version (package<x.y.z).

enum alpm_fileconflicttype_t

File conflict type. Whether the conflict results from a file existing on the filesystem, or with another target in the transaction.

Enumerator:

  • ALPM_FILECONFLICT_TARGET β€” The conflict results with a another target in the transaction.
  • ALPM_FILECONFLICT_FILESYSTEM β€” The conflict results from a file existing on the filesystem.

✨ Function Documentation ✨

alpm_list_t * alpm_checkconflicts (alpm_handle_t * handle, alpm_list_t * pkglist)

Check the package conflicts in a database.

Parameters

  • handle β€” the context handle
  • pkglist β€” the list of packages to check

Returns

  • an alpm_list_t of alpm_conflict_t

alpm_list_t * alpm_checkdeps (alpm_handle_t * handle, alpm_list_t * pkglist, alpm_list_t * remove, alpm_list_t * upgrade, int reversedeps)

Checks dependencies and returns missing ones in a list. Dependencies can include versions with depmod operators.

Parameters

  • handle β€” the context handle
  • pkglist β€” the list of local packages
  • remove β€” an alpm_list_t* of packages to be removed
  • upgrade β€” an alpm_list_t* of packages to be upgraded (remove-then-upgrade)
  • reversedeps β€” handles the backward dependencies

Returns

  • an alpm_list_t* of alpm_depmissing_t pointers.

void alpm_conflict_free (alpm_conflict_t * conflict)

Free a conflict and its members.

Parameters

  • conflict β€” the conflict to free

char * alpm_dep_compute_string (const alpm_depend_t * dep)

Returns a newly allocated string representing the dependency information.

Parameters

  • dep β€” a dependency info structure

Returns

  • a formatted string, e.g. "glibc>=2.12"

void alpm_dep_free (alpm_depend_t * dep)

Free a dependency info structure.

Parameters

  • dep β€” struct to free

alpm_depend_t * alpm_dep_from_string (const char * depstring)

Return a newly allocated dependency information parsed from a string should be used to free the dependency .

Parameters

  • depstring β€” a formatted string, e.g. "glibc=2.12"

Returns

  • a dependency info structure

void alpm_depmissing_free (alpm_depmissing_t * miss)

Free a depmissing and its members.

Parameters

  • miss β€” the depmissing to free

void alpm_fileconflict_free (alpm_fileconflict_t * conflict)

Free a fileconflict and its members.

Parameters

  • conflict β€” the fileconflict to free

alpm_pkg_t * alpm_find_dbs_satisfier (alpm_handle_t * handle, alpm_list_t * dbs, const char * depstring)

Find a package satisfying a specified dependency. First look for a literal, going through each db one by one. Then look for providers. The first satisfyer that belongs to an installed package is returned. If no providers belong to an installed package then an alpm_question_select_provider_t is created to select the provider. The dependency can include versions with depmod operators.

Parameters

  • handle β€” the context handle
  • dbs β€” an alpm_list_t* of alpm_db_t where the satisfyer will be searched
  • depstring β€” package or provision name, versioned or not

Returns

  • a alpm_pkg_t* satisfying depstring

alpm_pkg_t * alpm_find_satisfier (alpm_list_t * pkgs, const char * depstring)

Find a package satisfying a specified dependency. The dependency can include versions with depmod operators.

Parameters

  • pkgs β€” an alpm_list_t* of alpm_pkg_t where the satisfyer will be searched
  • depstring β€” package or provision name, versioned or not

Returns

  • a alpm_pkg_t* satisfying depstring

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libalpm from the source code.


and that's the whole page, bestie 🫢 no cap, that was every struct field, every enum value, every signature, every param and every return. The footer just tells us the source is libalpm and this lil page is libalpm_depends(3) β€” no date on it, so don't come for me about timestamps πŸ’…βœ¨ go free your dependencies, periodt πŸ’–

πŸ“¦ where this page comes from