libalpm_options(3)

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

πŸ’– libalpm_options πŸ’– β€” from the Library Functions Manual πŸŽ€

okay bestie, buckle up, because this one is a whole ✨journey✨. We're doing all the libalpm option getters and setters, and yes, there are like a million of them, but that's literally the point β€” every single one is here, no cap. πŸ¦‹


🌸 NAME 🌸

libalpm_options β€” Options

  • Libalpm option getters and setters

✨ SYNOPSIS ✨

🫢 Accessors for callbacks 🫢

the callback energy is immaculate here. Every one of these has a getter, a context getter, and a setter β€” it's giving matched set, it's giving coordinated outfit. πŸ‘‘

  • alpm_cb_log alpm_option_get_logcb (alpm_handle_t *handle) β€” Returns the callback used for logging.
  • void * alpm_option_get_logcb_ctx (alpm_handle_t *handle) β€” Returns the callback used for logging.
  • int alpm_option_set_logcb (alpm_handle_t *handle, alpm_cb_log cb, void *ctx) β€” Sets the callback used for logging.
  • alpm_cb_download alpm_option_get_dlcb (alpm_handle_t *handle) β€” Returns the callback used to report download progress.
  • void * alpm_option_get_dlcb_ctx (alpm_handle_t *handle) β€” Returns the callback used to report download progress.
  • int alpm_option_set_dlcb (alpm_handle_t *handle, alpm_cb_download cb, void *ctx) β€” Sets the callback used to report download progress.
  • alpm_cb_fetch alpm_option_get_fetchcb (alpm_handle_t *handle) β€” Returns the downloading callback.
  • void * alpm_option_get_fetchcb_ctx (alpm_handle_t *handle) β€” Returns the downloading callback.
  • int alpm_option_set_fetchcb (alpm_handle_t *handle, alpm_cb_fetch cb, void *ctx) β€” Sets the downloading callback.
  • alpm_cb_event alpm_option_get_eventcb (alpm_handle_t *handle) β€” Returns the callback used for events.
  • void * alpm_option_get_eventcb_ctx (alpm_handle_t *handle) β€” Returns the callback used for events.
  • int alpm_option_set_eventcb (alpm_handle_t *handle, alpm_cb_event cb, void *ctx) β€” Sets the callback used for events.
  • alpm_cb_question alpm_option_get_questioncb (alpm_handle_t *handle) β€” Returns the callback used for questions.
  • void * alpm_option_get_questioncb_ctx (alpm_handle_t *handle) β€” Returns the callback used for questions.
  • int alpm_option_set_questioncb (alpm_handle_t *handle, alpm_cb_question cb, void *ctx) β€” Sets the callback used for questions.
  • alpm_cb_progress alpm_option_get_progresscb (alpm_handle_t *handle) β€” Returns the callback used for operation progress.
  • void * alpm_option_get_progresscb_ctx (alpm_handle_t *handle) β€” Returns the callback used for operation progress.
  • int alpm_option_set_progresscb (alpm_handle_t *handle, alpm_cb_progress cb, void *ctx) β€” Sets the callback used for operation progress.

🌈 Accessors to the root directory 🌈

So the root directory is the prefix that libalpm installs packages to. That's the whole vibe. 🏠

Hooks and scriptlets will also be run in a chroot, and that's on purpose β€” it's so they behave correctly in alternative roots. iykyk. πŸ’…

  • const char * alpm_option_get_root (alpm_handle_t *handle) β€” Returns the root path.

πŸŽ€ Accessors to the database path πŸŽ€

The dbpath is where libalpm stores the local db and downloads sync databases. Two jobs, one directory, main character energy fr fr. πŸ—‚οΈ

  • const char * alpm_option_get_dbpath (alpm_handle_t *handle) β€” Returns the path to the database directory.

πŸ”’ Accessors to the lockfile πŸ”’

The lockfile is the thing that makes sure two instances of libalpm can never write to the database at the same time. It's literally the "one at a time, bestie" of the database world. βœ‹

Here's the timing, and it matters: the lock file is created when committing a transaction, and released when the transaction completes. Or when calling alpm_unlock. 🫢

  • const char * alpm_option_get_lockfile (alpm_handle_t *handle) β€” Get the name of the database lock file.

πŸ“ Accessors to the list of package cache directories. πŸ“

This is where libalpm will store downloaded packages. The stash. The little package pantry. 🧺

  • alpm_list_t * alpm_option_get_cachedirs (alpm_handle_t *handle) β€” Gets the currently configured cachedirs.
  • int alpm_option_set_cachedirs (alpm_handle_t *handle, alpm_list_t *cachedirs) β€” Sets the cachedirs.
  • int alpm_option_add_cachedir (alpm_handle_t *handle, const char *cachedir) β€” Append a cachedir to the configured cachedirs.
  • int alpm_option_remove_cachedir (alpm_handle_t *handle, const char *cachedir) β€” Remove a cachedir from the configured cachedirs.

πŸ¦‹ Accessors to the list of package hook directories. πŸ¦‹

libalpm will search these directories for hooks to run. Scavenger hunt, but make it package management. πŸ”

Heads up tho bestie: a hook in a later directory will override previous hooks if they have the same name. Last one wins, iconic. πŸ‘‘

  • alpm_list_t * alpm_option_get_hookdirs (alpm_handle_t *handle) β€” Gets the currently configured hookdirs.
  • int alpm_option_set_hookdirs (alpm_handle_t *handle, alpm_list_t *hookdirs) β€” Sets the hookdirs.
  • int alpm_option_add_hookdir (alpm_handle_t *handle, const char *hookdir) β€” Append a hookdir to the configured hookdirs.
  • int alpm_option_remove_hookdir (alpm_handle_t *handle, const char *hookdir) β€” Remove a hookdir from the configured hookdirs.

πŸ’… Accessors to the list of overwritable files. πŸ’…

okay so normally libalpm will refuse to install a package that owns files which are already on disk and not owned by that package. It's very "not yours, don't touch". πŸ™…

But! If a conflicting file matches a glob in the overwrite_files list, then no conflict will be raised and libalpm will simply overwrite the file. Just straight up taking over. πŸ’€

  • alpm_list_t * alpm_option_get_overwrite_files (alpm_handle_t *handle) β€” Gets the currently configured overwritable files.
  • int alpm_option_set_overwrite_files (alpm_handle_t *handle, alpm_list_t *globs) β€” Sets the overwritable files.
  • int alpm_option_add_overwrite_file (alpm_handle_t *handle, const char *glob) β€” Append an overwritable file to the configured overwritable files.
  • int alpm_option_remove_overwrite_file (alpm_handle_t *handle, const char *glob) β€” Remove a file glob from the configured overwritable files globs.

πŸ“ Accessors to the log file πŸ“

This controls where libalpm will save log output to. ✍️

  • const char * alpm_option_get_logfile (alpm_handle_t *handle) β€” Gets the filepath to the currently set logfile.
  • int alpm_option_set_logfile (alpm_handle_t *handle, const char *logfile) β€” Sets the logfile path.

πŸ” Accessors to the GPG directory πŸ”

This controls where libalpm will store GnuPG's files. Gotta keep the keys somewhere cute. πŸ—οΈ

  • const char * alpm_option_get_gpgdir (alpm_handle_t *handle) β€” Returns the path to libalpm's GnuPG home directory.
  • int alpm_option_set_gpgdir (alpm_handle_t *handle, const char *gpgdir) β€” Sets the path to libalpm's GnuPG home directory.

🧚 Accessors for use sandboxuser 🧚

This controls the user that libalpm will use for sensitive operations β€” like downloading files. Lowkey a security slay. πŸ›‘οΈ

  • const char * alpm_option_get_sandboxuser (alpm_handle_t *handle) β€” Returns the user to switch to for sensitive operations.
  • int alpm_option_set_sandboxuser (alpm_handle_t *handle, const char *sandboxuser) β€” Sets the user to switch to for sensitive operations.

🌸 Accessors for use syslog 🌸

This controls whether libalpm will also use the syslog. Dual logging, multitasking queen. πŸ“»

And even if this option is enabled, libalpm will still try to log to its log file. It's not replacing anything, it's just adding. πŸ’–
  • int alpm_option_get_usesyslog (alpm_handle_t *handle) β€” Returns whether to use syslog (0 is FALSE, TRUE otherwise).
  • int alpm_option_set_usesyslog (alpm_handle_t *handle, int usesyslog) β€” Sets whether to use syslog (0 is FALSE, TRUE otherwise).

🚫 Accessors to the list of no-upgrade files. 🚫

These functions modify the list of files which should not be updated by package installation. Hands off, respectfully. βœ‹

  • alpm_list_t * alpm_option_get_noupgrades (alpm_handle_t *handle) β€” Get the list of no-upgrade files.
  • int alpm_option_add_noupgrade (alpm_handle_t *handle, const char *path) β€” Add a file to the no-upgrade list.
  • int alpm_option_set_noupgrades (alpm_handle_t *handle, alpm_list_t *noupgrade) β€” Sets the list of no-upgrade files.
  • int alpm_option_remove_noupgrade (alpm_handle_t *handle, const char *path) β€” Remove an entry from the no-upgrade list.
  • int alpm_option_match_noupgrade (alpm_handle_t *handle, const char *path) β€” Test if a path matches any of the globs in the no-upgrade list.

πŸ™ˆ Accessors to the list of no-extract files. πŸ™ˆ

These functions modify the list of filenames which should be skipped packages which should not be upgraded by a sysupgrade operation. (Yes, the source sentence is a little scrambled β€” I'm relaying it exactly as it comes, no editorializing, that's the assignment. 🫢)

  • alpm_list_t * alpm_option_get_noextracts (alpm_handle_t *handle) β€” Get the list of no-extract files.
  • int alpm_option_add_noextract (alpm_handle_t *handle, const char *path) β€” Add a file to the no-extract list.
  • int alpm_option_set_noextracts (alpm_handle_t *handle, alpm_list_t *noextract) β€” Sets the list of no-extract files.
  • int alpm_option_remove_noextract (alpm_handle_t *handle, const char *path) β€” Remove an entry from the no-extract list.
  • int alpm_option_match_noextract (alpm_handle_t *handle, const char *path) β€” Test if a path matches any of the globs in the no-extract list.

😀 Accessors to the list of ignored packages. 😀

These functions modify the list of packages that should be ignored by a sysupgrade. Not today, package. 🚫

Real talk though: entries in this list may be globs, and they only match the package's name. Providers are not taken into account. Read that twice, it's a vibe check. πŸ‘€

  • alpm_list_t * alpm_option_get_ignorepkgs (alpm_handle_t *handle) β€” Get the list of ignored packages.
  • int alpm_option_add_ignorepkg (alpm_handle_t *handle, const char *pkg) β€” Add a file to the ignored package list.
  • int alpm_option_set_ignorepkgs (alpm_handle_t *handle, alpm_list_t *ignorepkgs) β€” Sets the list of packages to ignore.
  • int alpm_option_remove_ignorepkg (alpm_handle_t *handle, const char *pkg) β€” Remove an entry from the ignorepkg list.

🧊 Accessors to the list of ignored groups. 🧊

These functions modify the list of groups whose packages should be ignored by a sysupgrade. Whole group said "not today". 🫑

And yep β€” entries in this list may be globs too. ✨

  • alpm_list_t * alpm_option_get_ignoregroups (alpm_handle_t *handle) β€” Get the list of ignored groups.
  • int alpm_option_add_ignoregroup (alpm_handle_t *handle, const char *grp) β€” Add a file to the ignored group list.
  • int alpm_option_set_ignoregroups (alpm_handle_t *handle, alpm_list_t *ignoregrps) β€” Sets the list of groups to ignore.
  • int alpm_option_remove_ignoregroup (alpm_handle_t *handle, const char *grp) β€” Remove an entry from the ignoregroup list.

πŸ‘‘ Accessors to the list of ignored dependencies. πŸ‘‘

These functions modify the list of dependencies that should be ignored by a sysupgrade.

Basically? It's a list of virtual providers that packages can use to satisfy their dependencies. So you're telling libalpm "yeah bestie, that's already handled, don't worry about it". πŸ’…

  • alpm_list_t * alpm_option_get_assumeinstalled (alpm_handle_t *handle) β€” Gets the list of dependencies that are assumed to be met.
  • int alpm_option_add_assumeinstalled (alpm_handle_t *handle, const alpm_depend_t *dep) β€” Add a depend to the assumed installed list.
  • int alpm_option_set_assumeinstalled (alpm_handle_t *handle, alpm_list_t *deps) β€” Sets the list of dependencies that are assumed to be met.
  • int alpm_option_remove_assumeinstalled (alpm_handle_t *handle, const alpm_depend_t *dep) β€” Remove an entry from the assume installed list.

⭐ Accessors to the list of allowed architectures. ⭐

libalpm will only install packages that match one of the configured architectures.

The architectures do not need to match the physical architecture. They can just be treated as a label.

  • alpm_list_t * alpm_option_get_architectures (alpm_handle_t *handle) β€” returns the allowed package architecture.
  • int alpm_option_add_architecture (alpm_handle_t *handle, const char *arch) β€” adds an allowed package architecture.
  • int alpm_option_set_architectures (alpm_handle_t *handle, alpm_list_t *arches) β€” sets the allowed package architecture.
  • int alpm_option_remove_architecture (alpm_handle_t *handle, const char *arch) β€” removes an allowed package architecture.

🧸 Accessors for check space.

This controls whether libalpm will check that there's sufficient (yeah, space β€” you got it πŸ’…) before installing packages.

  • int alpm_option_get_checkspace (alpm_handle_t *handle) β€” get whether or not checking for free space before installing packages is enabled.
  • int alpm_option_set_checkspace (alpm_handle_t *handle, int checkspace) β€” enable/disable checking free space before installing packages.

πŸ—„οΈ Accessors for the database extension

This controls the extension used for sync databases.

libalpm will use this extension to both look up remote databases and as the name used when opening/reading them. iykyk ✨

This is useful for file databases. Seems as files can increase the size of a database by quite a lot, a server could hold a database without files under one extension, and another with files under another extension.

Which one is downloaded and used then depends on this setting. Wild, right? πŸ’–

  • const char * alpm_option_get_dbext (alpm_handle_t *handle) β€” gets the configured database extension.
  • int alpm_option_set_dbext (alpm_handle_t *handle, const char *dbext) β€” sets the database extension.

πŸ” Accessors for the signature levels

  • int alpm_option_get_default_siglevel (alpm_handle_t *handle) β€” get the default siglevel.
  • int alpm_option_set_default_siglevel (alpm_handle_t *handle, int level) β€” set the default siglevel.
  • int alpm_option_get_local_file_siglevel (alpm_handle_t *handle) β€” get the configured local file siglevel.
  • int alpm_option_set_local_file_siglevel (alpm_handle_t *handle, int level) β€” set the local file siglevel.
  • int alpm_option_get_remote_file_siglevel (alpm_handle_t *handle) β€” get the configured remote file siglevel.
  • int alpm_option_set_remote_file_siglevel (alpm_handle_t *handle, int level) β€” set the remote file siglevel.

⏳ Accessors for download timeout

By default, libalpm will timeout if a download has been transferring less than 1 byte for 10 seconds. One. Single. Byte. 😭

  • int alpm_option_set_disable_dl_timeout (alpm_handle_t *handle, unsigned short disable_dl_timeout) β€” enables/disables the download timeout.

πŸš€ Accessors for parallel downloads

alpm_db_update, alpm_fetch_pkgurl and alpm_trans_commit can all download packages in parallel. look at them go πŸ¦‹

This setting configures how many packages can be downloaded in parallel,

By default this value is set to 1, meaning packages are downloading sequentially. (yes bestie, one at a time, no cap)

  • int alpm_option_get_parallel_downloads (alpm_handle_t *handle) β€” gets the number of parallel streams to download database and package files.
  • int alpm_option_set_parallel_downloads (alpm_handle_t *handle, unsigned int num_streams) β€” sets number of parallel streams to download database and package files.

πŸ“¦ Accessors for sandbox

By default, libalpm will sandbox the downloader process. protective queen behavior honestly 🫢

  • int alpm_option_set_disable_sandbox (alpm_handle_t *handle, unsigned short disable_sandbox) β€” enables/disables the sandbox.

✨ Detailed Description ✨

Libalpm option getters and setters. the whole buffet πŸ“

πŸ’… Function Documentation πŸ’…

int alpm_option_add_architecture (alpm_handle_t * handle, const char * arch)

Adds an allowed package architecture.

Parameters

  • handle β€” the context handle
  • arch β€” the architecture to set

References alpm_option_add_architecture().

Referenced by alpm_option_add_architecture().

int alpm_option_add_assumeinstalled (alpm_handle_t * handle, const alpm_depend_t * dep)

Add a depend to the assumed installed list.

Parameters

  • handle β€” the context handle
  • dep β€” the dependency to add

Returns 0 on success, -1 on error (pm_errno is set accordingly)

References alpm_option_add_assumeinstalled().

Referenced by alpm_option_add_assumeinstalled().

int alpm_option_add_cachedir (alpm_handle_t * handle, const char * cachedir)

Append a cachedir to the configured cachedirs.

Parameters

  • handle β€” the context handle
  • cachedir β€” the cachedir to add

Returns 0 on success, -1 on error (pm_errno is set accordingly)

References alpm_option_add_cachedir().

Referenced by alpm_option_add_cachedir().

int alpm_option_add_hookdir (alpm_handle_t * handle, const char * hookdir)

Append a hookdir to the configured hookdirs.

Parameters

  • handle β€” the context handle
  • hookdir β€” the hookdir to add

Returns 0 on success, -1 on error (pm_errno is set accordingly)

References alpm_option_add_hookdir().

Referenced by alpm_option_add_hookdir().

int alpm_option_add_ignoregroup (alpm_handle_t * handle, const char * grp)

Add a file to the ignored group list.

Parameters

  • handle β€” the context handle
  • grp β€” the group to add

Returns 0 on success, -1 on error (pm_errno is set accordingly)

References alpm_option_add_ignoregroup().

Referenced by alpm_option_add_ignoregroup().

int alpm_option_add_ignorepkg (alpm_handle_t * handle, const char * pkg)

Add a file to the ignored package list.

Parameters

  • handle β€” the context handle
  • pkg β€” the package to add

Returns 0 on success, -1 on error (pm_errno is set accordingly)

References alpm_option_add_ignorepkg().

Referenced by alpm_option_add_ignorepkg().

int alpm_option_add_noextract (alpm_handle_t * handle, const char * path)

Add a file to the no-extract list.

Parameters

  • handle β€” the context handle
  • path β€” the path to add

Returns 0 on success, -1 on error (pm_errno is set accordingly)

References alpm_option_add_noextract().

Referenced by alpm_option_add_noextract().

int alpm_option_add_noupgrade (alpm_handle_t * handle, const char * path)

Add a file to the no-upgrade list.

Parameters

  • handle β€” the context handle
  • path β€” the path to add

Returns 0 on success, -1 on error (pm_errno is set accordingly)

References alpm_option_add_noupgrade().

Referenced by alpm_option_add_noupgrade().

int alpm_option_add_overwrite_file (alpm_handle_t * handle, const char * glob)

Append an overwritable file to the configured overwritable files.

Parameters

  • handle β€” the context handle
  • glob β€” the file glob to add

Returns 0 on success, -1 on error (pm_errno is set accordingly)

References alpm_option_add_overwrite_file().

Referenced by alpm_option_add_overwrite_file().

alpm_list_t * alpm_option_get_architectures (alpm_handle_t * handle)

Returns the allowed package architecture.

Parameters

  • handle β€” the context handle

Returns the configured package architectures

References alpm_option_get_architectures().

Referenced by alpm_option_get_architectures().

alpm_list_t * alpm_option_get_assumeinstalled (alpm_handle_t * handle)

Gets the list of dependencies that are assumed to be met.

Parameters

  • handle β€” the context handle

Returns a list of alpm_depend_t*

References alpm_option_get_assumeinstalled().

Referenced by alpm_option_get_assumeinstalled().

alpm_list_t * alpm_option_get_cachedirs (alpm_handle_t * handle)

Gets the currently configured cachedirs. (yes the page literally has a stray ,. at the end β€” iconique πŸ’€)

Parameters

  • handle β€” the context handle

Returns a char* list of cache directories

References alpm_option_get_cachedirs().

Referenced by alpm_option_get_cachedirs().

int alpm_option_get_checkspace (alpm_handle_t * handle)

Get whether or not checking for free space before installing packages is enabled.

Parameters

  • handle β€” the context handle

Returns 0 if disabled, 1 if enabled

References alpm_option_get_checkspace().

Referenced by alpm_option_get_checkspace().

const char * alpm_option_get_dbext (alpm_handle_t * handle)

Gets the configured database extension.

Parameters

  • handle β€” the context handle

Returns the configured database extension

References alpm_option_get_dbext().

Referenced by alpm_option_get_dbext().

const char * alpm_option_get_dbpath (alpm_handle_t * handle)

Returns the path to the database directory. Read-only. don't even try it bestie 🚫

Parameters

  • handle β€” the context handle

References alpm_option_get_dbpath().

Referenced by alpm_option_get_dbpath().

int alpm_option_get_default_siglevel (alpm_handle_t * handle)

Get the default siglevel.

Parameters

  • handle β€” the context handle

Returns a alpm_siglevel_t bitfield of the siglevel

References alpm_option_get_default_siglevel().

Referenced by alpm_option_get_default_siglevel().

alpm_cb_download alpm_option_get_dlcb (alpm_handle_t * handle)

Returns the callback used to report download progress.

Parameters

  • handle β€” the context handle

Returns the currently set download callback

References alpm_option_get_dlcb().

Referenced by alpm_option_get_dlcb().

void * alpm_option_get_dlcb_ctx (alpm_handle_t * handle)

Returns the callback used to report download progress.

Parameters

  • handle β€” the context handle

Returns the currently set download callback context

References alpm_option_get_dlcb_ctx().

Referenced by alpm_option_get_dlcb_ctx().

alpm_cb_event alpm_option_get_eventcb (alpm_handle_t * handle)

Returns the callback used for events.

Parameters

  • handle β€” the context handle

Returns the currently set event callback

References alpm_option_get_eventcb().

Referenced by alpm_option_get_eventcb().

void * alpm_option_get_eventcb_ctx (alpm_handle_t * handle)

Returns the callback used for events.

Parameters

  • handle β€” the context handle

Returns the currently set event callback context

References alpm_option_get_eventcb_ctx().

Referenced by alpm_option_get_eventcb_ctx().

alpm_cb_fetch alpm_option_get_fetchcb (alpm_handle_t * handle)

Returns the downloading callback.

Parameters

  • handle β€” the context handle

Returns the currently set fetch callback

References alpm_option_get_fetchcb().

Referenced by alpm_option_get_fetchcb().

void * alpm_option_get_fetchcb_ctx (alpm_handle_t * handle)

Returns the downloading callback.

Parameters

  • handle β€” the context handle

Returns the currently set fetch callback context

References alpm_option_get_fetchcb_ctx().

Referenced by alpm_option_get_fetchcb_ctx().

okay continuing the getter tour, bestie β€” we're still in the alpm_option_get_* section and it keeps going πŸ’…

const char *alpm_option_get_gpgdir(alpm_handle_t *handle)

hands you the path to libalpm's GnuPG home directory πŸ”‘

  • Parameters
    • handle β€” the context handle
  • Returns β€” the path to libalpm's GnuPG home directory

References: alpm_option_get_gpgdir(). Referenced by: alpm_option_get_gpgdir().


alpm_list_t *alpm_option_get_hookdirs(alpm_handle_t *handle)

gets the hookdirs you currently have configured ✨

  • Parameters
    • handle β€” the context handle
  • Returns β€” a char* list of hook directories

References: alpm_option_get_hookdirs(). Referenced by: alpm_option_get_hookdirs().


alpm_list_t *alpm_option_get_ignoregroups(alpm_handle_t *handle)

gets the list of ignored groups, no cap πŸ™ˆ

  • Parameters
    • handle β€” the context handle
  • Returns β€” the char* list of ignored groups

References: alpm_option_get_ignoregroups(). Referenced by: alpm_option_get_ignoregroups().


alpm_list_t *alpm_option_get_ignorepkgs(alpm_handle_t *handle)

gets the list of ignored packages πŸŽ€

  • Parameters
    • handle β€” the context handle
  • Returns β€” the char* list of ignored packages

References: alpm_option_get_ignorepkgs(). Referenced by: alpm_option_get_ignorepkgs().


int alpm_option_get_local_file_siglevel(alpm_handle_t *handle)

gets the configured local file siglevel πŸ”’

  • Parameters
    • handle β€” the context handle
  • Returns β€” an alpm_siglevel_t bitfield of the siglevel

References: alpm_option_get_local_file_siglevel(). Referenced by: alpm_option_get_local_file_siglevel().


const char *alpm_option_get_lockfile(alpm_handle_t *handle)

gets the name of the database lock file. Read-only. it's the name the lockfile would have β€” and honestly? it does not matter whether the lockfile actually exists on disk or not, the name is the name πŸ’€

  • Parameters
    • handle β€” the context handle

References: alpm_option_get_lockfile(). Referenced by: alpm_option_get_lockfile().


alpm_cb_log alpm_option_get_logcb(alpm_handle_t *handle)

returns the callback used for logging πŸ“

  • Parameters
    • handle β€” the context handle
  • Returns β€” the currently set log callback

References: alpm_option_get_logcb(). Referenced by: alpm_option_get_logcb().


void *alpm_option_get_logcb_ctx(alpm_handle_t *handle)

returns the callback used for logging β€” this one's the context half of the duo 🫢

  • Parameters
    • handle β€” the context handle
  • Returns β€” the currently set log callback context

References: alpm_option_get_logcb_ctx(). Referenced by: alpm_option_get_logcb_ctx().


const char *alpm_option_get_logfile(alpm_handle_t *handle)

gets the filepath to the logfile you currently have set 🌸

  • Parameters
    • handle β€” the context handle
  • Returns β€” the path to the logfile

References: alpm_option_get_logfile(). Referenced by: alpm_option_get_logfile().


alpm_list_t *alpm_option_get_noextracts(alpm_handle_t *handle)

gets the list of no-extract files 🚫

  • Parameters
    • handle β€” the context handle
  • Returns β€” the char* list of no-extract files

References: alpm_option_get_noextracts(). Referenced by: alpm_option_get_noextracts().


alpm_list_t *alpm_option_get_noupgrades(alpm_handle_t *handle)

gets the list of no-upgrade files β¬†οΈπŸš«

  • Parameters
    • handle β€” the context handle
  • Returns β€” the char* list of no-upgrade files

References: alpm_option_get_noupgrades(). Referenced by: alpm_option_get_noupgrades().


alpm_list_t *alpm_option_get_overwrite_files(alpm_handle_t *handle)

gets the overwritable files you currently have configured ✨

  • Parameters
    • handle β€” the context handle
  • Returns β€” a char* list of overwritable file globs

References: alpm_option_get_overwrite_files(). Referenced by: alpm_option_get_overwrite_files().


int alpm_option_get_parallel_downloads(alpm_handle_t *handle)

gets how many parallel streams are used to download database and package files πŸš€

  • Parameters
    • handle β€” the context handle
  • Returns β€” the number of parallel streams to download database and package files

References: alpm_option_get_parallel_downloads(). Referenced by: alpm_option_get_parallel_downloads().


alpm_cb_progress alpm_option_get_progresscb(alpm_handle_t *handle)

returns the callback used for operation progress πŸ“Š

  • Parameters
    • handle β€” the context handle
  • Returns β€” the currently set progress callback

References: alpm_option_get_progresscb(). Referenced by: alpm_option_get_progresscb().


void *alpm_option_get_progresscb_ctx(alpm_handle_t *handle)

returns the callback used for operation progress β€” again, the context one 🫢

  • Parameters
    • handle β€” the context handle
  • Returns β€” the currently set progress callback context

References: alpm_option_get_progresscb_ctx(). Referenced by: alpm_option_get_progresscb_ctx().


alpm_cb_question alpm_option_get_questioncb(alpm_handle_t *handle)

returns the callback used for questions ❓

  • Parameters
    • handle β€” the context handle
  • Returns β€” the currently set question callback

References: alpm_option_get_questioncb(). Referenced by: alpm_option_get_questioncb().


void *alpm_option_get_questioncb_ctx(alpm_handle_t *handle)

returns the callback used for questions β€” yep, the context version πŸ’…

  • Parameters
    • handle β€” the context handle
  • Returns β€” the currently set question callback context

References: alpm_option_get_questioncb_ctx(). Referenced by: alpm_option_get_questioncb_ctx().


int alpm_option_get_remote_file_siglevel(alpm_handle_t *handle)

gets the configured remote file siglevel πŸ”

  • Parameters
    • handle β€” the context handle
  • Returns β€” an alpm_siglevel_t bitfield of the siglevel

References: alpm_option_get_remote_file_siglevel(). Referenced by: alpm_option_get_remote_file_siglevel().


const char *alpm_option_get_root(alpm_handle_t *handle)

returns the root path. Read-only β€” look, don't touch 🌳

  • Parameters
    • handle β€” the context handle

References: alpm_option_get_root(). Referenced by: alpm_option_get_root().


const char *alpm_option_get_sandboxuser(alpm_handle_t *handle)

returns the user to switch to for sensitive operations 🧚

ngl this one's short β€” it doesn't even list a handle parameter block in the docs, it just gives you the user name.
  • Returns β€” the user name

References: alpm_option_get_sandboxuser(). Referenced by: alpm_option_get_sandboxuser().


int alpm_option_get_usesyslog(alpm_handle_t *handle)

returns whether to use syslog β€” 0 is FALSE, anything else is TRUE πŸ“»

  • Parameters
    • handle β€” the context handle
  • Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References: alpm_option_get_usesyslog(). Referenced by: alpm_option_get_usesyslog().


int alpm_option_match_noextract(alpm_handle_t *handle, const char *path)

tests whether a path matches any of the globs chilling in the no-extract list πŸ”

  • Parameters
    • handle β€” the context handle
    • path β€” the path to test
  • Returns β€” 0 if the path matches a glob, negative if there is no match, and positive if the match was inverted

References: alpm_option_match_noextract(). Referenced by: alpm_option_match_noextract().


int alpm_option_match_noupgrade(alpm_handle_t *handle, const char *path)

tests whether a path matches any of the globs in the no-upgrade list πŸ”

  • Parameters
    • handle β€” the context handle
    • path β€” the path to test
  • Returns β€” 0 if the path matches a glob, negative if there is no match, and positive if the match was inverted

References: alpm_option_match_noupgrade(). Referenced by: alpm_option_match_noupgrade().


πŸ—‘οΈ the remove squad β€” alpm_option_remove_*

okay so this is the part where you take stuff out of the config instead of adding it. vibe check: it's giving cleanup era 🧹


int alpm_option_remove_architecture(alpm_handle_t *handle, const char *arch)

removes an allowed package architecture πŸ—οΈ

  • Parameters
    • handle β€” the context handle
    • arch β€” the architecture to remove

References: alpm_option_remove_architecture(). Referenced by: alpm_option_remove_architecture().


int alpm_option_remove_assumeinstalled(alpm_handle_t *handle, const alpm_depend_t *dep)

removes an entry from the assume-installed list 🫑

  • Parameters
    • handle β€” the context handle
    • dep β€” the dep to remove
  • Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References: alpm_option_remove_assumeinstalled(). Referenced by: alpm_option_remove_assumeinstalled().


int alpm_option_remove_cachedir(alpm_handle_t *handle, const char *cachedir)

removes a cachedir from the configured cachedirs πŸ“¦

  • Parameters
    • handle β€” the context handle
    • cachedir β€” the cachedir to remove
  • Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References: alpm_option_remove_cachedir(). Referenced by: alpm_option_remove_cachedir().


int alpm_option_remove_hookdir(alpm_handle_t *handle, const char *hookdir)

removes a hookdir from the configured hookdirs πŸͺ

  • Parameters
    • handle β€” the context handle
    • hookdir β€” the hookdir to remove
  • Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References: alpm_option_remove_hookdir(). Referenced by: alpm_option_remove_hookdir().


int alpm_option_remove_ignoregroup(alpm_handle_t *handle, const char *grp)

removes an entry from the ignoregroup list πŸ™ˆ

  • Parameters
    • handle β€” the context handle
    • grp β€” the group to remove
  • Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References: alpm_option_remove_ignoregroup(). Referenced by: alpm_option_remove_ignoregroup().


int alpm_option_remove_ignorepkg(alpm_handle_t *handle, const char *pkg)

removes an entry from the ignorepkg list πŸ“¦

  • Parameters
    • handle β€” the context handle
    • pkg β€” the package to remove
  • Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References: alpm_option_remove_ignorepkg(). Referenced by: alpm_option_remove_ignorepkg().


int alpm_option_remove_noextract(alpm_handle_t *handle, const char *path)

removes an entry from the no-extract list 🚫

  • Parameters
    • handle β€” the context handle
    • path β€” the path to remove
  • Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References: alpm_option_remove_noextract(). Referenced by: alpm_option_remove_noextract().


int alpm_option_remove_noupgrade(alpm_handle_t *handle, const char *path)

removes an entry from the no-upgrade list ⬆️

  • Parameters
    • handle β€” the context handle
    • path β€” the path to remove
  • Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References: alpm_option_remove_noupgrade(). Referenced by: alpm_option_remove_noupgrade().


int alpm_option_remove_overwrite_file(alpm_handle_t *handle, const char *glob)

removes a file glob from the configured overwritable files globs πŸ—‚οΈ

Note β€” bestie, read this one twice: the overwritable file list contains a list of globs. the glob you pass in to remove must exactly match the entry you want gone. there is no glob expansion. like, at all. it's literally matching strings, not vibing πŸ’€
  • Parameters
    • handle β€” the context handle
    • glob β€” the file glob to remove
  • Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References: alpm_option_remove_overwrite_file(). Referenced by: alpm_option_remove_overwrite_file().

References β€” alpm_option_remove_overwrite_file().

Referenced by β€” alpm_option_remove_overwrite_file().


🌈 alpm_option_set_architectures

int alpm_option_set_architectures (alpm_handle_t * handle, alpm_list_t * arches)

okay so this one sets the allowed package architecture. like, which arch is even allowed to install, bestie πŸ’…

Parameters

  • handle β€” the context handle
  • arches β€” the architecture to set

References β€” alpm_option_set_architectures().

Referenced by β€” alpm_option_set_architectures().


πŸ’– alpm_option_set_assumeinstalled

int alpm_option_set_assumeinstalled (alpm_handle_t * handle, alpm_list_t * deps)

Sets the list of dependencies that are assumed to be met. i.e. "girl don't even check these, I got it" β€” no cap.

Parameters

  • handle β€” the context handle
  • deps β€” a list of *alpm_depend_t The list will be duped and the original will still need to be freed by the caller.

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_assumeinstalled().

Referenced by β€” alpm_option_set_assumeinstalled().


πŸŽ€ alpm_option_set_cachedirs

int alpm_option_set_cachedirs (alpm_handle_t * handle, alpm_list_t * cachedirs)

Sets the cachedirs. the stash spots πŸ—‚οΈ

Parameters

  • handle β€” the context handle
  • cachedirs β€” a char* list of cachdirs. The list will be duped and the original will still need to be freed by the caller.

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_cachedirs().

Referenced by β€” alpm_option_set_cachedirs().


πŸ¦‹ alpm_option_set_checkspace

int alpm_option_set_checkspace (alpm_handle_t * handle, int checkspace)

Enable/disable checking free space before installing packages. literally the vibe check for your disk πŸ’€

Parameters

  • handle β€” the context handle
  • checkspace β€” 0 for disabled, 1 for enabled

References β€” alpm_option_set_checkspace().

Referenced by β€” alpm_option_set_checkspace().


🌸 alpm_option_set_dbext

int alpm_option_set_dbext (alpm_handle_t * handle, const char * dbext)

Sets the database extension.

Parameters

  • handle β€” the context handle
  • dbext β€” the database extension to use

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_dbext().

Referenced by β€” alpm_option_set_dbext().


πŸ”₯ alpm_option_set_default_siglevel

int alpm_option_set_default_siglevel (alpm_handle_t * handle, int level)

Set the default siglevel. the signature trust settings, the main character of security ✨

Parameters

  • handle β€” the context handle
  • level β€” a alpm_siglevel_t bitfield of the level to set

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_default_siglevel().

Referenced by β€” alpm_option_set_default_siglevel().


πŸ’€ alpm_option_set_disable_dl_timeout

int alpm_option_set_disable_dl_timeout (alpm_handle_t * handle, unsigned short disable_dl_timeout)

Enables/disables the download timeout. note the inverted logic, bestie β€” it's giving chaotic but that's literally what the docs say 😭

Parameters

  • handle β€” the context handle
  • disable_dl_timeout β€” 0 for enabled, 1 for disabled

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_disable_dl_timeout().

Referenced by β€” alpm_option_set_disable_dl_timeout().


🧚 alpm_option_set_disable_sandbox

int alpm_option_set_disable_sandbox (alpm_handle_t * handle, unsigned short disable_sandbox)

Enables/disables the sandbox. same inverted vibe as above, watch it πŸ‘€

Parameters

  • handle β€” the context handle
  • disable_sandbox β€” 0 for enabled, 1 for disabled

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_disable_sandbox().

Referenced by β€” alpm_option_set_disable_sandbox().


πŸ“ alpm_option_set_dlcb

int alpm_option_set_dlcb (alpm_handle_t * handle, alpm_cb_download cb, void * ctx)

Sets the callback used to report download progress. the little progress bar moment πŸ“₯

Parameters

  • handle β€” the context handle
  • cb β€” the cb to use
  • ctx β€” user-provided context to pass to cb

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_dlcb().

Referenced by β€” alpm_option_set_dlcb().


⭐ alpm_option_set_eventcb

int alpm_option_set_eventcb (alpm_handle_t * handle, alpm_cb_event cb, void * ctx)

Sets the callback used for events.

Parameters

  • handle β€” the context handle
  • cb β€” the cb to use
  • ctx β€” user-provided context to pass to cb

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_eventcb().

Referenced by β€” alpm_option_set_eventcb().


🫢 alpm_option_set_fetchcb

int alpm_option_set_fetchcb (alpm_handle_t * handle, alpm_cb_fetch cb, void * ctx)

Sets the downloading callback.

Parameters

  • handle β€” the context handle
  • cb β€” the cb to use
  • ctx β€” user-provided context to pass to cb

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_fetchcb().

Referenced by β€” alpm_option_set_fetchcb().


πŸ”‘ alpm_option_set_gpgdir

int alpm_option_set_gpgdir (alpm_handle_t * handle, const char * gpgdir)

Sets the path to libalpm's GnuPG home directory.

Parameters

  • handle β€” the context handle
  • gpgdir β€” the gpgdir to set

References β€” alpm_option_set_gpgdir().

Referenced by β€” alpm_option_set_gpgdir().


πŸͺ alpm_option_set_hookdirs

int alpm_option_set_hookdirs (alpm_handle_t * handle, alpm_list_t * hookdirs)

Sets the hookdirs.

Parameters

  • handle β€” the context handle
  • hookdirs β€” a char* list of hookdirs. The list will be duped and the original will still need to be freed by the caller.

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_hookdirs().

Referenced by β€” alpm_option_set_hookdirs().


πŸ™ˆ alpm_option_set_ignoregroups

int alpm_option_set_ignoregroups (alpm_handle_t * handle, alpm_list_t * ignoregrps)

Sets the list of groups to ignore. the "not me, not today" list πŸ’…

Parameters

  • handle β€” the context handle
  • ignoregrps β€” a char* list of groups to ignore The list will be duped and the original will still need to be freed by the caller.

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_ignoregroups().

Referenced by β€” alpm_option_set_ignoregroups().


🌟 alpm_option_set_ignorepkgs

int alpm_option_set_ignorepkgs (alpm_handle_t * handle, alpm_list_t * ignorepkgs)

Sets the list of packages to ignore. same energy, but for packages specifically.

Parameters

  • handle β€” the context handle
  • ignorepkgs β€” a char* list of packages to ignore The list will be duped and the original will still need to be freed by the caller.

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_ignorepkgs().

Referenced by β€” alpm_option_set_ignorepkgs().


🌈 alpm_option_set_local_file_siglevel

int alpm_option_set_local_file_siglevel (alpm_handle_t * handle, int level)

Set the local file siglevel.

Parameters

  • handle β€” the context handle
  • level β€” a alpm_siglevel_t bitfield of the level to set

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_local_file_siglevel().

Referenced by β€” alpm_option_set_local_file_siglevel().


πŸ“ alpm_option_set_logcb

int alpm_option_set_logcb (alpm_handle_t * handle, alpm_cb_log cb, void * ctx)

Sets the callback used for logging. where the receipts get written down 🧾

Parameters

  • handle β€” the context handle
  • cb β€” the cb to use
  • ctx β€” user-provided context to pass to cb

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_logcb().

Referenced by β€” alpm_option_set_logcb().


πŸ“‚ alpm_option_set_logfile

int alpm_option_set_logfile (alpm_handle_t * handle, const char * logfile)

Sets the logfile path.

Parameters

  • handle β€” the context handle
  • logfile β€” path to the new location of the logfile

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_logfile().

Referenced by β€” alpm_option_set_logfile().


🚫 alpm_option_set_noextracts

int alpm_option_set_noextracts (alpm_handle_t * handle, alpm_list_t * noextract)

Sets the list of no-extract files. these ones do NOT get unpacked, periodt.

Parameters

  • handle β€” the context handle
  • noextract β€” a char* list of file to not extract. The list will be duped and the original will still need to be freed by the caller.

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_noextracts().

Referenced by β€” alpm_option_set_noextracts().


⏸️ alpm_option_set_noupgrades

int alpm_option_set_noupgrades (alpm_handle_t * handle, alpm_list_t * noupgrade)

Sets the list of no-upgrade files.

Parameters

  • handle β€” the context handle
  • noupgrade β€” a char* list of file to not upgrade. The list will be duped and the original will still need to be freed by the caller.

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_noupgrades().

Referenced by β€” alpm_option_set_noupgrades().


πŸ’₯ alpm_option_set_overwrite_files

int alpm_option_set_overwrite_files (alpm_handle_t * handle, alpm_list_t * globs)

Sets the overwritable files. the "yeah I know it collides, do it anyway" list, bestie 🫣

Parameters

  • handle β€” the context handle
  • globs β€” a char* list of overwritable file globs. The list will be duped and the original will still need to be freed by the caller.

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_overwrite_files().

Referenced by β€” alpm_option_set_overwrite_files().


⚑ alpm_option_set_parallel_downloads

int alpm_option_set_parallel_downloads (alpm_handle_t * handle, unsigned int num_streams)

Sets number of parallel streams to download database and package files. multitasking icon behavior πŸ”₯

Parameters

  • handle β€” the context handle
  • num_streams β€” number of parallel download streams

Returns β€” 0 on success, -1 on error

heads up: this Returns line is literally just 0 on success, -1 on error β€” no pm_errno mention here. that's how the page has it, so that's how I'm giving it to you πŸ’–

References β€” alpm_option_set_parallel_downloads().

Referenced by β€” alpm_option_set_parallel_downloads().


πŸ“Š alpm_option_set_progresscb

int alpm_option_set_progresscb (alpm_handle_t * handle, alpm_cb_progress cb, void * ctx)

Sets the callback used for operation progress.

Parameters

  • handle β€” the context handle
  • cb β€” the cb to use
  • ctx β€” user-provided context to pass to cb

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_progresscb().

Referenced by β€” alpm_option_set_progresscb().


❓ alpm_option_set_questioncb

int alpm_option_set_questioncb (alpm_handle_t * handle, alpm_cb_question cb, void * ctx)

Sets the callback used for questions. yk, when it has to ask you something mid-operation πŸ™‹β€β™€οΈ

Parameters

  • handle β€” the context handle
  • cb β€” the cb to use
  • ctx β€” user-provided context to pass to cb

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_questioncb().

Referenced by β€” alpm_option_set_questioncb().


🌐 alpm_option_set_remote_file_siglevel

int alpm_option_set_remote_file_siglevel (alpm_handle_t * handle, int level)

Set the remote file siglevel.

Parameters

  • handle β€” the context handle
  • level β€” a alpm_siglevel_t bitfield of the level to set

Returns β€” 0 on success, -1 on error (pm_errno is set accordingly)

References β€” alpm_option_set_remote_file_siglevel().

Referenced by β€” alpm_option_set_remote_file_siglevel().


πŸ§‘β€πŸ’» alpm_option_set_sandboxuser

int alpm_option_set_sandboxuser (alpm_handle_t * handle, const char * sandboxuser)

Sets the user to switch to for sensitive operations.

Parameters

  • handle β€” the context handle
  • sandboxuser β€” the user to set

References β€” alpm_option_set_sandboxuser().

Referenced by β€” alpm_option_set_sandboxuser().

✨ alpm_option_set_usesyslog ✨

int alpm_option_set_usesyslog (alpm_handle_t * handle, int usesyslog)

Okay bestie, this one's a little toggle switch for the syslog vibe πŸ’… It sets whether the library should use syslog. Pass 0 and that's FALSE, pass anything else and it's TRUE (yes, literally "TRUE otherwise" β€” it's not out here being picky, any nonzero is a yes πŸ”₯).

🫢 Parameters

  • handle β€” the context handle πŸ’– like, the whole entire context, that's what you're poking at
  • usesyslog β€” whether to use the syslog. 0 is FALSE, TRUE otherwise. That's it, that's the whole mood 🌸

πŸ”— References

alpm_option_set_usesyslog() β€” yes babes, the function literally references itself 😭 iconic self-love, main character energy fr fr.

πŸ‘‘ Referenced by

alpm_option_set_usesyslog() β€” and it's also referenced by itself. She's her own reference, no cap πŸ’€πŸ’… We love a self-sufficient queen.


🌈 Author

Generated automatically by Doxygen for libalpm from the source code. So nobody hand-wrote this bad boy, the machine did it for us βœ¨πŸ€– still slaps though.


And that's a wrap on libalpm_options(3) β€” part 5, done, ate and left no crumbs πŸŽ€πŸ“ This page came to you straight from libalpm, page libalpm_options(3), and it's the last line of the whole thing so we're signing off πŸ’œπŸ¦‹ mwah, go set some options bestie ✨

πŸ“¦ where this page comes from