libalpm_options(3)
π 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 (0is FALSE, TRUE otherwise).int alpm_option_set_usesyslog (alpm_handle_t *handle, int usesyslog)β Sets whether to use syslog (0is 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_tbitfield 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_tbitfield 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 β
0on success,-1on error (pm_errnois 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 handlepathβ the path to test
- Returns β
0if 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 handlepathβ the path to test
- Returns β
0if 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 handlearchβ 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 handledepβ the dep to remove
- Returns β
0on success,-1on error (pm_errnois 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 handlecachedirβ the cachedir to remove
- Returns β
0on success,-1on error (pm_errnois 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 handlehookdirβ the hookdir to remove
- Returns β
0on success,-1on error (pm_errnois 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 handlegrpβ the group to remove
- Returns β
0on success,-1on error (pm_errnois 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 handlepkgβ the package to remove
- Returns β
0on success,-1on error (pm_errnois 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 handlepathβ the path to remove
- Returns β
0on success,-1on error (pm_errnois 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 handlepathβ the path to remove
- Returns β
0on success,-1on error (pm_errnois 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 handleglobβ the file glob to remove
- Returns β
0on success,-1on error (pm_errnois 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 handlearchesβ 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 handledepsβ a list of*alpm_depend_tThe 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 handlecachedirsβ achar*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 handlecheckspaceβ0for disabled,1for 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 handledbextβ 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 handlelevelβ aalpm_siglevel_tbitfield 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 handledisable_dl_timeoutβ0for enabled,1for 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 handledisable_sandboxβ0for enabled,1for 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 handlecbβ the cb to usectxβ 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 handlecbβ the cb to usectxβ 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 handlecbβ the cb to usectxβ 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 handlegpgdirβ 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 handlehookdirsβ achar*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 handleignoregrpsβ achar*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 handleignorepkgsβ achar*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 handlelevelβ aalpm_siglevel_tbitfield 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 handlecbβ the cb to usectxβ 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 handlelogfileβ 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 handlenoextractβ achar*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 handlenoupgradeβ achar*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 handleglobsβ achar*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 handlenum_streamsβ number of parallel download streams
Returns β 0 on success, -1 on error
heads up: this Returns line is literally just0 on success, -1 on errorβ nopm_errnomention 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 handlecbβ the cb to usectxβ 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 handlecbβ the cb to usectxβ 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 handlelevelβ aalpm_siglevel_tbitfield 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 handlesandboxuserβ 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 atusesyslogβ whether to use the syslog.0is 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
- epel 10: libalpm-devel 7.0.0-5.el10_2 Β· GPL-2.0-or-later
- fedora 43: libalpm-devel 7.0.0-5.fc43 Β· GPL-2.0-or-later
- fedora 43: libalpm-devel 7.0.0-5.fc43 Β· GPL-2.0-or-later
- fedora 44: libalpm-devel 7.0.0-6.fc44 Β· GPL-2.0-or-later
- fedora 44: libalpm-devel 7.0.0-6.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms