libalpm_misc(3)

πŸ“¦
version 7.0.0 Β· 4 versions
, in epel 10, fedora 43, fedora 44

okay bestie, welcome to libalpm_misc(3) from the Library Functions Manual β€” the miscellaneous-functions page, and the way it’s literally just a little grab bag of libalpm helpers is highkey iconic πŸ’…βœ¨

🌸 NAME 🌸

libalpm_misc β€” Miscellaneous Functions

  • Various libalpm functions

πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so here’s the shape of everything, no cap 🫢

πŸŽ€ Typedefs πŸŽ€

  • typedef int64_t alpm_time_t β€” The time type used by libalpm.

🧚 Enumerations 🧚

enum alpm_caps { ALPM_CAPABILITY_NLS = (1 << 0),
           ALPM_CAPABILITY_DOWNLOADER = (1 << 1), ALPM_CAPABILITY_SIGNATURES =
           (1 << 2) }

Enum of possible compile time features.

πŸ”₯ Functions πŸ”₯

  • alpm_pkg_t * alpm_sync_get_new_version (alpm_pkg_t *pkg, alpm_list_t *dbs_sync) β€” Check for new version of pkg in syncdbs.
  • char * alpm_compute_md5sum (const char *filename) β€” Get the md5 sum of file.
  • char * alpm_compute_sha256sum (const char *filename) β€” Get the sha256 sum of file.
  • int alpm_unlock (alpm_handle_t *handle) β€” Remove the database lock file.
  • const char * alpm_version (void) β€” Get the version of library.
  • int alpm_capabilities (void) β€” Get the capabilities of the library.
  • int alpm_sandbox_setup_child (alpm_handle_t *handle, const char *sandboxuser, const char *sandbox_path) β€” Drop privileges by switching to a different user.

πŸ’œ Detailed Description πŸ’œ

Various libalpm functions β€” that’s the whole plot, and honestly it ate ✨

✨ Typedef Documentation ✨

🫢 typedef int64_t alpm_time_t 🫢

The time type used by libalpm. Represents a unix time stamp

🌈 Enumeration Type Documentation 🌈

πŸ’… enum alpm_caps πŸ’…

Enum of possible compile time features.

πŸŽ€ Enumerator πŸŽ€

  • ALPM_CAPABILITY_NLS β€” localization
  • ALPM_CAPABILITY_DOWNLOADER β€” Ability to download.
  • ALPM_CAPABILITY_SIGNATURES β€” Signature checking.

πŸ“ Function Documentation πŸ“

πŸ”₯ int alpm_capabilities (void ) πŸ”₯

Get the capabilities of the library.

Returns: a bitmask of the capabilities

πŸ“ char * alpm_compute_md5sum (const char * filename) πŸ“

Get the md5 sum of file.

Parameters:

  • filename β€” name of the file

Returns: the checksum on success, NULL on error

πŸ“ char * alpm_compute_sha256sum (const char * filename) πŸ“

Get the sha256 sum of file.

Parameters:

  • filename β€” name of the file

Returns: the checksum on success, NULL on error

πŸ¦‹ int alpm_sandbox_setup_child (alpm_handle_t * handle, const char * sandboxuser, const char * sandbox_path) πŸ¦‹

Drop privileges by switching to a different user.

Parameters:

  • handle β€” the context handle
  • sandboxuser β€” the user to switch to
  • sandbox_path β€” if non-NULL, restrict writes to this filesystem path

Returns: 0 on success, -1 on failure

πŸ‘‘ alpm_pkg_t * alpm_sync_get_new_version (alpm_pkg_t * pkg, alpm_list_t * dbs_sync) πŸ‘‘

Check for new version of pkg in syncdbs. If the same package appears multiple dbs only the first will be checked

This only checks the syncdb for a newer version. It does not access the network at all. See alpm_db_update to update a database.

πŸ’€ int alpm_unlock (alpm_handle_t * handle) πŸ’€

Remove the database lock file.

Parameters:

  • handle β€” the context handle

Returns: 0 on success, -1 on error

Note: Safe to call from inside signal handlers.

⭐ const char * alpm_version (void ) ⭐

Get the version of library.

Returns: the library version, e.g. "6.0.4"

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libalpm from the source code.


okay bestie, we made it 🫢 β€” footer shoutout: source/version libalpm, page libalpm_misc(3), and the date is not printed anywhere, so we’re respectfully calling it timeless πŸ’…βœ¨

πŸ“¦ where this page comes from