43#include <archive_entry.h>
81typedef struct _alpm_handle_t alpm_handle_t;
101typedef struct _alpm_db_t alpm_db_t;
114typedef struct _alpm_pkg_t alpm_pkg_t;
119typedef struct _alpm_pkg_xdata_t {
134typedef struct _alpm_file_t {
144typedef struct _alpm_filelist_t {
152typedef struct _alpm_backup_t {
179typedef struct _alpm_group_t {
205typedef enum _alpm_errno_t {
379typedef enum _alpm_siglevel_t {
405typedef enum _alpm_sigstatus_t {
422typedef enum _alpm_sigvalidity_t {
434typedef struct _alpm_pgpkey_t {
467typedef struct _alpm_sigresult_t {
480typedef struct _alpm_siglist_t {
520 unsigned char **data,
size_t *data_len);
533 const unsigned char *sig,
const size_t len,
alpm_list_t **keys);
546typedef enum _alpm_depmod_t {
566typedef enum _alpm_fileconflicttype_t {
577typedef struct _alpm_depend_t {
591typedef struct _alpm_depmissing_t {
602typedef struct _alpm_conflict_t {
616typedef struct _alpm_fileconflict_t {
718typedef enum _alpm_event_type_t {
802typedef struct _alpm_event_any_t {
808typedef enum _alpm_package_operation_t {
822typedef struct _alpm_event_package_operation_t {
834typedef struct _alpm_event_optdep_removal_t {
844typedef struct _alpm_event_scriptlet_info_t {
856typedef struct _alpm_event_database_missing_t {
864typedef struct _alpm_event_pkgdownload_t {
872typedef struct _alpm_event_pacnew_created_t {
886typedef struct _alpm_event_pacsave_created_t {
896typedef enum _alpm_hook_when_t {
904typedef struct _alpm_event_hook_t {
912typedef struct _alpm_event_hook_run_t {
926typedef struct _alpm_event_pkg_retrieve_t {
940typedef union _alpm_event_t {
980typedef enum _alpm_question_type_t {
998typedef struct _alpm_question_any_t {
1006typedef struct _alpm_question_install_ignorepkg_t {
1016typedef struct _alpm_question_replace_t {
1030typedef struct _alpm_question_conflict_t {
1040typedef struct _alpm_question_corrupted_t {
1052typedef struct _alpm_question_remove_pkgs_t {
1062typedef struct _alpm_question_select_provider_t {
1074typedef struct _alpm_question_import_key_t {
1091typedef union _alpm_question_t {
1122typedef enum _alpm_progress_t {
1159 int percent,
size_t howmany,
size_t current);
1168typedef enum _alpm_download_event_type_t {
1180typedef struct _alpm_download_event_init_t {
1186typedef struct _alpm_download_event_progress_t {
1194typedef struct _alpm_download_event_retry_t {
1200typedef struct _alpm_download_event_completed_t {
1449typedef enum _alpm_db_usage_t {
1494typedef enum _alpm_loglevel_t {
2328typedef enum _alpm_pkgreason_t {
2338typedef enum _alpm_pkgfrom_t {
2349typedef enum _alpm_pkgvalidation_t {
2376int alpm_pkg_load(alpm_handle_t *handle,
const char *filename,
int full,
2377 int level, alpm_pkg_t **pkg);
2661int alpm_pkg_get_sig(alpm_pkg_t *pkg,
unsigned char **sig,
size_t *sig_len);
2725 const alpm_pkg_t *pkg,
void *fp);
2756 struct archive_entry **entry);
2790typedef enum _alpm_transflag_t {
2899int alpm_add_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg);
alpm_question_type_t type
Type of question.
Definition alpm.h:1076
alpm_question_type_t type
Type of question.
Definition alpm.h:1008
int install
Answer: whether or not to install pkg anyway.
Definition alpm.h:1010
int replace
Answer: whether or not to replace oldpkg with newpkg.
Definition alpm.h:1020
int optional
whether this file is optional and thus the errors could be ignored
Definition alpm.h:1182
alpm_question_type_t type
Type of question.
Definition alpm.h:1018
alpm_pkg_t * newpkg
New Package.
Definition alpm.h:880
int use_index
Answer: which provider to use (index from providers)
Definition alpm.h:1066
alpm_question_type_t type
The type of question.
Definition alpm.h:1093
alpm_event_type_t type
Type of event.
Definition alpm.h:874
const char * file
Filename of the file without the .pacnew suffix.
Definition alpm.h:882
alpm_event_scriptlet_info_t scriptlet_info
A scriptlet was ran.
Definition alpm.h:950
off_t downloaded
Amount of data downloaded.
Definition alpm.h:1188
const char * uid
UID of the key to import.
Definition alpm.h:1080
alpm_question_corrupted_t corrupted
Should a corrupted package be deleted?
Definition alpm.h:1104
int from_noupgrade
Whether the creation was result of a NoUpgrade or not.
Definition alpm.h:876
alpm_depend_t * depend
What providers provide for.
Definition alpm.h:1070
alpm_question_type_t type
Type of question.
Definition alpm.h:1000
alpm_event_type_t type
Type of event.
Definition alpm.h:866
alpm_package_operation_t operation
Type of operation.
Definition alpm.h:826
const char * name
Name of hook.
Definition alpm.h:916
alpm_event_package_operation_t package_operation
Package operation.
Definition alpm.h:946
alpm_event_hook_run_t hook_run
A hook was ran.
Definition alpm.h:962
alpm_event_type_t type
Type of event.
Definition alpm.h:888
alpm_question_any_t any
A question that can represent any question.
Definition alpm.h:1096
alpm_event_database_missing_t database_missing
A database is missing.
Definition alpm.h:952
alpm_pkg_t * newpkg
Package to replace with.
Definition alpm.h:1024
int resume
If the download will resume or start over.
Definition alpm.h:1196
alpm_errno_t reason
Error code indicating the reason for package invalidity.
Definition alpm.h:1048
alpm_pkg_t * newpkg
New package.
Definition alpm.h:830
alpm_pkg_t * oldpkg
Old package.
Definition alpm.h:878
size_t position
position of hook being run
Definition alpm.h:920
alpm_hook_when_t when
Type of hook.
Definition alpm.h:908
int answer
Answer.
Definition alpm.h:1002
alpm_question_select_provider_t select_provider
Provider selection.
Definition alpm.h:1108
alpm_event_pkg_retrieve_t pkg_retrieve
Download packages.
Definition alpm.h:964
alpm_pkg_t * oldpkg
Old package.
Definition alpm.h:890
alpm_question_install_ignorepkg_t install_ignorepkg
Should target in ignorepkg be installed anyway?
Definition alpm.h:1098
const char * line
Line of scriptlet output.
Definition alpm.h:848
alpm_list_t * packages
List of alpm_pkg_t* with unresolved dependencies.
Definition alpm.h:1058
alpm_event_type_t type
Type of event.
Definition alpm.h:846
size_t total
total hooks being run
Definition alpm.h:922
alpm_question_remove_pkgs_t remove_pkgs
Should unresolvable targets be removed from the transaction?
Definition alpm.h:1106
size_t num
Number of packages to download.
Definition alpm.h:930
off_t total
Total amount need to be downloaded.
Definition alpm.h:1190
alpm_event_type_t type
Type of event.
Definition alpm.h:824
const char * desc
Description of hook to be outputted.
Definition alpm.h:918
alpm_event_type_t type
Type of event it's always safe to access this.
Definition alpm.h:942
alpm_event_pacsave_created_t pacsave_created
A pacsave file was created.
Definition alpm.h:958
int skip
Answer: whether or not to skip packages.
Definition alpm.h:1056
alpm_pkg_t * oldpkg
Old package.
Definition alpm.h:828
off_t total_size
Total size of packages to download.
Definition alpm.h:932
alpm_question_type_t type
Type of question.
Definition alpm.h:1054
alpm_list_t * providers
List of alpm_pkg_t* as possible providers.
Definition alpm.h:1068
int result
download result code: 0 - download completed successfully 1 - the file is up-to-date -1 - error
Definition alpm.h:1208
alpm_question_type_t type
Type of question.
Definition alpm.h:1064
alpm_question_import_key_t import_key
Should a key be imported?
Definition alpm.h:1110
alpm_event_pkgdownload_t pkgdownload
A package was downloaded.
Definition alpm.h:954
alpm_question_replace_t replace
Should a package be replaced?
Definition alpm.h:1100
alpm_event_type_t type
Type of event.
Definition alpm.h:928
alpm_pkg_t * oldpkg
Package to be replaced.
Definition alpm.h:1022
alpm_event_type_t type
Type of event.
Definition alpm.h:836
alpm_pkg_t * pkg
Package with the optdep.
Definition alpm.h:838
const char * dbname
Name of the database.
Definition alpm.h:860
alpm_event_type_t type
Type of event.
Definition alpm.h:804
alpm_event_type_t type
Type of event.
Definition alpm.h:906
alpm_event_hook_t hook
Pre/post transaction hooks are being ran.
Definition alpm.h:960
alpm_conflict_t * conflict
Conflict info.
Definition alpm.h:1036
alpm_event_type_t type
Type of event.
Definition alpm.h:858
int remove
Answer: whether or not to remove filepath.
Definition alpm.h:1044
alpm_question_type_t type
Type of question.
Definition alpm.h:1042
alpm_event_pacnew_created_t pacnew_created
A pacnew file was created.
Definition alpm.h:956
alpm_question_conflict_t conflict
Should a conflicting package be removed?
Definition alpm.h:1102
alpm_event_optdep_removal_t optdep_removal
An optdept was remove.
Definition alpm.h:948
alpm_question_type_t type
Type of question.
Definition alpm.h:1032
alpm_db_t * newdb
DB of newpkg.
Definition alpm.h:1026
const char * filepath
File to remove.
Definition alpm.h:1046
alpm_pkg_t * pkg
The ignored package that we are deciding whether to install.
Definition alpm.h:1012
int remove
Answer: whether or not to remove conflict->package2.
Definition alpm.h:1034
alpm_depend_t * optdep
Optdep being removed.
Definition alpm.h:840
alpm_event_type_t type
Type of event.
Definition alpm.h:914
const char * file
Filename of the file without the .pacsave suffix.
Definition alpm.h:892
off_t total
Total bytes in file.
Definition alpm.h:1202
const char * fingerprint
Fingerprint the key to import.
Definition alpm.h:1082
alpm_event_any_t any
The any event type.
Definition alpm.h:944
const char * file
Name of the file.
Definition alpm.h:868
void(* alpm_cb_question)(void *ctx, alpm_question_t *question)
Question callback.
Definition alpm.h:1119
alpm_download_event_type_t
File download events.
Definition alpm.h:1168
alpm_hook_when_t
Kind of hook.
Definition alpm.h:896
alpm_progress_t
An enum over different kinds of progress alerts.
Definition alpm.h:1122
int(* alpm_cb_fetch)(void *ctx, const char *url, const char *localpath, int force)
A callback for downloading files.
Definition alpm.h:1229
alpm_question_type_t
Type of question.
Definition alpm.h:980
void(* alpm_cb_event)(void *ctx, alpm_event_t *event)
Event callback.
Definition alpm.h:972
void(* alpm_cb_progress)(void *ctx, alpm_progress_t progress, const char *pkg, int percent, size_t howmany, size_t current)
Progress callback.
Definition alpm.h:1158
alpm_event_type_t
Type of events.
Definition alpm.h:718
alpm_package_operation_t
An enum over the kind of package operations.
Definition alpm.h:808
void(* alpm_cb_download)(void *ctx, const char *filename, alpm_download_event_type_t event, void *data)
Type of download progress callbacks.
Definition alpm.h:1217
@ ALPM_DOWNLOAD_PROGRESS
A download made progress.
Definition alpm.h:1172
@ ALPM_DOWNLOAD_COMPLETED
A download completed.
Definition alpm.h:1176
@ ALPM_DOWNLOAD_INIT
A download was started.
Definition alpm.h:1170
@ ALPM_DOWNLOAD_RETRY
Download will be retried.
Definition alpm.h:1174
@ ALPM_HOOK_PRE_TRANSACTION
Definition alpm.h:898
@ ALPM_HOOK_POST_TRANSACTION
Definition alpm.h:900
@ ALPM_PROGRESS_DISKSPACE_START
Diskspace checking.
Definition alpm.h:1136
@ ALPM_PROGRESS_DOWNGRADE_START
Package downgrade.
Definition alpm.h:1128
@ ALPM_PROGRESS_REINSTALL_START
Package reinstall.
Definition alpm.h:1130
@ ALPM_PROGRESS_INTEGRITY_START
Package Integrity checking.
Definition alpm.h:1138
@ ALPM_PROGRESS_KEYRING_START
Checking signatures of packages.
Definition alpm.h:1142
@ ALPM_PROGRESS_UPGRADE_START
Package upgrade.
Definition alpm.h:1126
@ ALPM_PROGRESS_ADD_START
Package install.
Definition alpm.h:1124
@ ALPM_PROGRESS_CONFLICTS_START
Conflict checking.
Definition alpm.h:1134
@ ALPM_PROGRESS_LOAD_START
Loading packages from disk.
Definition alpm.h:1140
@ ALPM_PROGRESS_REMOVE_START
Package removal.
Definition alpm.h:1132
@ ALPM_QUESTION_CORRUPTED_PKG
Should a corrupted package be deleted?
Definition alpm.h:988
@ ALPM_QUESTION_INSTALL_IGNOREPKG
Should target in ignorepkg be installed anyway?
Definition alpm.h:982
@ ALPM_QUESTION_SELECT_PROVIDER
Provider selection.
Definition alpm.h:992
@ ALPM_QUESTION_REMOVE_PKGS
Should unresolvable targets be removed from the transaction?
Definition alpm.h:990
@ ALPM_QUESTION_CONFLICT_PKG
Should a conflicting package be removed?
Definition alpm.h:986
@ ALPM_QUESTION_REPLACE_PKG
Should a package be replaced?
Definition alpm.h:984
@ ALPM_QUESTION_IMPORT_KEY
Should a key be imported?
Definition alpm.h:994
@ ALPM_EVENT_CHECKDEPS_DONE
Dependencies were computed for a package.
Definition alpm.h:722
@ ALPM_EVENT_KEY_DOWNLOAD_DONE
Key downloading is finished.
Definition alpm.h:785
@ ALPM_EVENT_KEY_DOWNLOAD_START
Downloading missing keys into keyring.
Definition alpm.h:783
@ ALPM_EVENT_HOOK_START
Processing hooks will be started.
Definition alpm.h:792
@ ALPM_EVENT_TRANSACTION_DONE
Processing the package transaction is finished.
Definition alpm.h:738
@ ALPM_EVENT_PACKAGE_OPERATION_START
Package will be installed/upgraded/downgraded/re-installed/removed; See alpm_event_package_operation_...
Definition alpm.h:741
@ ALPM_EVENT_INTEGRITY_START
Target package's integrity will be checked.
Definition alpm.h:746
@ ALPM_EVENT_CHECKDEPS_START
Dependencies will be computed for a package.
Definition alpm.h:720
@ ALPM_EVENT_FILECONFLICTS_START
File conflicts will be computed for a package.
Definition alpm.h:724
@ ALPM_EVENT_DISKSPACE_START
Disk space usage will be computed for a package.
Definition alpm.h:769
@ ALPM_EVENT_DISKSPACE_DONE
Disk space usage was computed for a package.
Definition alpm.h:771
@ ALPM_EVENT_PACNEW_CREATED
A .pacnew file was created; See alpm_event_pacnew_created_t for arguments.
Definition alpm.h:787
@ ALPM_EVENT_PACSAVE_CREATED
A .pacsave file was created; See alpm_event_pacsave_created_t for arguments.
Definition alpm.h:790
@ ALPM_EVENT_SCRIPTLET_INFO
Scriptlet has printed information; See alpm_event_scriptlet_info_t for arguments.
Definition alpm.h:755
@ ALPM_EVENT_RESOLVEDEPS_START
Dependencies will be resolved for target package.
Definition alpm.h:728
@ ALPM_EVENT_DATABASE_MISSING
A configured repository database is missing; See alpm_event_database_missing_t for arguments.
Definition alpm.h:777
@ ALPM_EVENT_PACKAGE_OPERATION_DONE
Package was installed/upgraded/downgraded/re-installed/removed; See alpm_event_package_operation_t fo...
Definition alpm.h:744
@ ALPM_EVENT_DB_RETRIEVE_FAILED
Not all database files were successfully downloaded from a repository.
Definition alpm.h:761
@ ALPM_EVENT_INTEGRITY_DONE
Target package's integrity was checked.
Definition alpm.h:748
@ ALPM_EVENT_HOOK_DONE
Processing hooks is finished.
Definition alpm.h:794
@ ALPM_EVENT_PKG_RETRIEVE_FAILED
Not all package files were successfully downloaded from a repository.
Definition alpm.h:767
@ ALPM_EVENT_PKG_RETRIEVE_DONE
Package files were downloaded from a repository.
Definition alpm.h:765
@ ALPM_EVENT_INTERCONFLICTS_DONE
Inter-conflicts were checked for target package.
Definition alpm.h:734
@ ALPM_EVENT_LOAD_DONE
Target package is finished loading.
Definition alpm.h:752
@ ALPM_EVENT_FILECONFLICTS_DONE
File conflicts were computed for a package.
Definition alpm.h:726
@ ALPM_EVENT_LOAD_START
Target package will be loaded.
Definition alpm.h:750
@ ALPM_EVENT_PKG_RETRIEVE_START
Package files will be downloaded from a repository.
Definition alpm.h:763
@ ALPM_EVENT_HOOK_RUN_DONE
A hook has finished running.
Definition alpm.h:798
@ ALPM_EVENT_TRANSACTION_START
Processing the package transaction is starting.
Definition alpm.h:736
@ ALPM_EVENT_OPTDEP_REMOVAL
An optdepend for another package is being removed; See alpm_event_optdep_removal_t for arguments.
Definition alpm.h:774
@ ALPM_EVENT_INTERCONFLICTS_START
Inter-conflicts will be checked for target package.
Definition alpm.h:732
@ ALPM_EVENT_DB_RETRIEVE_START
Database files will be downloaded from a repository.
Definition alpm.h:757
@ ALPM_EVENT_KEYRING_DONE
Keyring checking is finished.
Definition alpm.h:781
@ ALPM_EVENT_RESOLVEDEPS_DONE
Dependencies were resolved for target package.
Definition alpm.h:730
@ ALPM_EVENT_DB_RETRIEVE_DONE
Database files were downloaded from a repository.
Definition alpm.h:759
@ ALPM_EVENT_KEYRING_START
Checking keys used to create signatures are in keyring.
Definition alpm.h:779
@ ALPM_EVENT_HOOK_RUN_START
A hook is starting.
Definition alpm.h:796
@ ALPM_PACKAGE_INSTALL
Package (to be) installed.
Definition alpm.h:810
@ ALPM_PACKAGE_UPGRADE
Package (to be) upgraded.
Definition alpm.h:812
@ ALPM_PACKAGE_REMOVE
Package (to be) removed (No newpkg)
Definition alpm.h:818
@ ALPM_PACKAGE_REINSTALL
Package (to be) re-installed.
Definition alpm.h:814
@ ALPM_PACKAGE_DOWNGRADE
Package (to be) downgraded.
Definition alpm.h:816
Context struct for when a download completes.
Definition alpm.h:1200
Context struct for when a download starts.
Definition alpm.h:1180
Context struct for when a download progresses.
Definition alpm.h:1186
Context struct for when a download retries.
Definition alpm.h:1194
An event that may represent any event.
Definition alpm.h:802
A database is missing.
Definition alpm.h:856
A pre/post transaction hook was ran.
Definition alpm.h:912
pre/post transaction hooks are to be ran.
Definition alpm.h:904
An optional dependency was removed.
Definition alpm.h:834
A package operation event occurred.
Definition alpm.h:822
A pacnew file was created.
Definition alpm.h:872
A pacsave file was created.
Definition alpm.h:886
Packages downloading about to start.
Definition alpm.h:926
A package was downloaded.
Definition alpm.h:864
A scriptlet was ran.
Definition alpm.h:844
A question that can represent any other question.
Definition alpm.h:998
Should a conflicting package be removed?
Definition alpm.h:1030
Should a corrupted package be deleted?
Definition alpm.h:1040
Should a key be imported?
Definition alpm.h:1074
Should target in ignorepkg be installed anyway?
Definition alpm.h:1006
Should unresolvable targets be removed from the transaction?
Definition alpm.h:1052
Should a package be replaced?
Definition alpm.h:1016
Provider selection.
Definition alpm.h:1062
Events.
Definition alpm.h:940
Questions.
Definition alpm.h:1091
alpm_group_t * alpm_db_get_group(alpm_db_t *db, const char *name)
Get a group entry from a package database.
Definition db.c:328
int alpm_db_unregister(alpm_db_t *db)
Unregister a package database.
Definition db.c:98
int alpm_db_set_servers(alpm_db_t *db, alpm_list_t *servers)
Sets the list of servers for the database to use.
Definition db.c:160
int alpm_db_set_cache_servers(alpm_db_t *db, alpm_list_t *servers)
Sets the list of cache servers for the database to use.
Definition db.c:140
int alpm_db_add_cache_server(alpm_db_t *db, const char *url)
Add a download cache server to a database.
Definition db.c:187
alpm_list_t * alpm_db_get_cache_servers(const alpm_db_t *db)
Get the list of cache servers assigned to this db.
Definition db.c:134
int alpm_db_get_valid(alpm_db_t *db)
Check the validity of a database.
Definition db.c:299
alpm_list_t * alpm_db_get_groupcache(alpm_db_t *db)
Get the group cache of a package database.
Definition db.c:338
alpm_list_t * alpm_db_get_pkgcache(alpm_db_t *db)
Get the package cache of a package database.
Definition db.c:321
alpm_list_t * alpm_get_syncdbs(alpm_handle_t *handle)
Get the list of sync databases.
Definition handle.c:839
alpm_db_t * alpm_register_syncdb(alpm_handle_t *handle, const char *treename, int level)
Register a sync database of packages.
Definition db.c:40
int alpm_db_get_siglevel(alpm_db_t *db)
Get the signature verification level for a database.
Definition db.c:289
int alpm_db_remove_cache_server(alpm_db_t *db, const char *url)
Remove a download cache server from a database.
Definition db.c:225
int alpm_db_add_server(alpm_db_t *db, const char *url)
Add a download server to a database.
Definition db.c:206
const char * alpm_db_get_name(const alpm_db_t *db)
Get the name of a package database.
Definition db.c:283
int alpm_db_search(alpm_db_t *db, const alpm_list_t *needles, alpm_list_t **ret)
Searches a database with regular expressions.
Definition db.c:346
int alpm_db_set_usage(alpm_db_t *db, int usage)
Sets the usage of a database.
Definition db.c:356
alpm_list_t * alpm_db_get_servers(const alpm_db_t *db)
Get the list of servers assigned to this db.
Definition db.c:154
alpm_db_usage_t
The usage level of a database.
Definition alpm.h:1449
alpm_handle_t * alpm_db_get_handle(alpm_db_t *db)
Get the handle of a package database.
Definition db.c:277
alpm_pkg_t * alpm_db_get_pkg(alpm_db_t *db, const char *name)
Get a package entry from a package database.
Definition db.c:306
int alpm_unregister_all_syncdbs(alpm_handle_t *handle)
Unregister all package databases.
Definition db.c:78
alpm_db_t * alpm_get_localdb(alpm_handle_t *handle)
Get the database of locally installed packages.
Definition handle.c:833
int alpm_db_get_usage(alpm_db_t *db, int *usage)
Gets the usage of a database.
Definition db.c:363
int alpm_db_remove_server(alpm_db_t *db, const char *url)
Remove a download server from a database.
Definition db.c:251
int alpm_db_update(alpm_handle_t *handle, alpm_list_t *dbs, int force)
Update package databases.
Definition be_sync.c:139
@ ALPM_DB_USAGE_SEARCH
Enable search for this database.
Definition alpm.h:1453
@ ALPM_DB_USAGE_SYNC
Enable refreshes for this database.
Definition alpm.h:1451
@ ALPM_DB_USAGE_ALL
Enable all usage levels.
Definition alpm.h:1459
@ ALPM_DB_USAGE_INSTALL
Enable installing packages from this database.
Definition alpm.h:1455
@ ALPM_DB_USAGE_UPGRADE
Enable sysupgrades with this database.
Definition alpm.h:1457
alpm_depend_t * depend
The dependency that was wanted.
Definition alpm.h:595
alpm_depend_t * reason
The conflict.
Definition alpm.h:608
char * desc
A description of why this dependency is needed (optional)
Definition alpm.h:583
char * name
Name of the provider to satisfy this dependency.
Definition alpm.h:579
char * version
Version of the provider to match against (optional)
Definition alpm.h:581
alpm_pkg_t * package2
The second package.
Definition alpm.h:606
char * target
Name of the package that has the dependency.
Definition alpm.h:593
alpm_fileconflicttype_t type
The type of conflict.
Definition alpm.h:620
char * target
The name of the package that caused the conflict.
Definition alpm.h:618
char * causingpkg
If the depmissing was caused by a conflict, the name of the package that would be installed,...
Definition alpm.h:598
char * file
The name of the file that the package conflicts with.
Definition alpm.h:622
char * ctarget
The name of the package that also owns the file if there is one.
Definition alpm.h:624
alpm_pkg_t * package1
The first package.
Definition alpm.h:604
alpm_depmod_t mod
How the version should match against the provider.
Definition alpm.h:587
unsigned long name_hash
A hash of name (used internally to speed up conflict checks)
Definition alpm.h:585
alpm_pkg_t * alpm_find_satisfier(alpm_list_t *pkgs, const char *depstring)
Find a package satisfying a specified dependency.
Definition deps.c:289
void alpm_fileconflict_free(alpm_fileconflict_t *conflict)
Free a fileconflict and its members.
Definition conflict.c:289
char * alpm_dep_compute_string(const alpm_depend_t *dep)
Returns a newly allocated string representing the dependency information.
Definition deps.c:865
alpm_list_t * alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglist, alpm_list_t *remove, alpm_list_t *upgrade, int reversedeps)
Checks dependencies and returns missing ones in a list.
Definition deps.c:300
alpm_depend_t * alpm_dep_from_string(const char *depstring)
Return a newly allocated dependency information parsed from a string should be used to free the depen...
Definition deps.c:458
alpm_pkg_t * alpm_find_dbs_satisfier(alpm_handle_t *handle, alpm_list_t *dbs, const char *depstring)
Find a package satisfying a specified dependency.
Definition deps.c:751
alpm_list_t * alpm_checkconflicts(alpm_handle_t *handle, alpm_list_t *pkglist)
Check the package conflicts in a database.
Definition conflict.c:240
void alpm_depmissing_free(alpm_depmissing_t *miss)
Free a depmissing and its members.
Definition deps.c:65
void alpm_dep_free(alpm_depend_t *dep)
Free a dependency info structure.
Definition deps.c:38
void alpm_conflict_free(alpm_conflict_t *conflict)
Free a conflict and its members.
Definition conflict.c:64
alpm_depmod_t
Types of version constraints in dependency specs.
Definition alpm.h:546
alpm_fileconflicttype_t
File conflict type.
Definition alpm.h:566
@ ALPM_DEP_MOD_LE
Test for at most a version (package<=x.y.z)
Definition alpm.h:554
@ ALPM_DEP_MOD_GT
Test for greater than some version (package>x.y.z)
Definition alpm.h:556
@ ALPM_DEP_MOD_GE
Test for at least a version (package>=x.y.z)
Definition alpm.h:552
@ ALPM_DEP_MOD_LT
Test for less than some version (package<x.y.z)
Definition alpm.h:558
@ ALPM_DEP_MOD_ANY
No version constraint.
Definition alpm.h:548
@ ALPM_DEP_MOD_EQ
Test version equality (package=x.y.z)
Definition alpm.h:550
@ ALPM_FILECONFLICT_TARGET
The conflict results with a another target in the transaction.
Definition alpm.h:568
@ ALPM_FILECONFLICT_FILESYSTEM
The conflict results from a file existing on the filesystem.
Definition alpm.h:570
A conflict that has occurred between two packages.
Definition alpm.h:602
The basic dependency type.
Definition alpm.h:577
Missing dependency.
Definition alpm.h:591
File conflict.
Definition alpm.h:616
const char * alpm_strerror(alpm_errno_t err)
Returns the string corresponding to an error number.
Definition error.c:35
alpm_errno_t
libalpm's error type
Definition alpm.h:205
alpm_errno_t alpm_errno(alpm_handle_t *handle)
Returns the current error code from the handle.
Definition error.c:30
@ ALPM_ERR_SIG_INVALID
Signatures are invalid.
Definition alpm.h:301
@ ALPM_ERR_TRANS_NOT_NULL
A transaction is already initialized.
Definition alpm.h:257
@ ALPM_ERR_CONFLICTING_DEPS
Conflicting dependencies.
Definition alpm.h:306
@ ALPM_ERR_TRANS_NULL
A transaction has not been initialized.
Definition alpm.h:259
@ ALPM_ERR_SIG_MISSING
Signatures are missing.
Definition alpm.h:299
@ ALPM_ERR_DB_NULL
Database should not be null.
Definition alpm.h:235
@ ALPM_ERR_TRANS_NOT_LOCKED
Tried to commit transaction without locking the database.
Definition alpm.h:273
@ ALPM_ERR_OK
No error.
Definition alpm.h:207
@ ALPM_ERR_DB_REMOVE
Failed to remove entry from database.
Definition alpm.h:249
@ ALPM_ERR_GPGME
Error in gpgme.
Definition alpm.h:322
@ ALPM_ERR_UNSATISFIED_DEPS
Dependencies could not be satisfied.
Definition alpm.h:304
@ ALPM_ERR_EXTERNAL_DOWNLOAD
Error in external download program.
Definition alpm.h:320
@ ALPM_ERR_PKG_IGNORED
Package is in ignorepkg.
Definition alpm.h:280
@ ALPM_ERR_SYSTEM
A system error occurred.
Definition alpm.h:211
@ ALPM_ERR_MEMORY
Failed to allocate memory.
Definition alpm.h:209
@ ALPM_ERR_TRANS_NOT_PREPARED
Transaction has not been prepared.
Definition alpm.h:267
@ ALPM_ERR_LIBARCHIVE
Error in libarchive.
Definition alpm.h:316
@ ALPM_ERR_PKG_OPEN
Cannot open the package file.
Definition alpm.h:290
@ ALPM_ERR_PKG_NOT_FOUND
Package not found.
Definition alpm.h:278
@ ALPM_ERR_PKG_INVALID_SIG
Package has an invalid signature.
Definition alpm.h:286
@ ALPM_ERR_DB_CREATE
Failed to create database.
Definition alpm.h:233
@ ALPM_ERR_DB_VERSION
The localdb is in a newer/older format than libalpm expects.
Definition alpm.h:245
@ ALPM_ERR_DB_WRITE
Failed to write to the database.
Definition alpm.h:247
@ ALPM_ERR_DB_OPEN
Failed to open database.
Definition alpm.h:231
@ ALPM_ERR_BADPERMS
Permmision denied.
Definition alpm.h:213
@ ALPM_ERR_MISSING_CAPABILITY_SIGNATURES
Missing compile-time features.
Definition alpm.h:324
@ ALPM_ERR_TRANS_ABORT
Transaction was aborted.
Definition alpm.h:269
@ ALPM_ERR_TRANS_DUP_FILENAME
Duplicate filename in transaction.
Definition alpm.h:263
@ ALPM_ERR_RETRIEVE
Download failed.
Definition alpm.h:311
@ ALPM_ERR_PKG_INVALID_ARCH
Package has an invalid architecture.
Definition alpm.h:296
@ ALPM_ERR_TRANS_TYPE
Failed to interrupt transaction.
Definition alpm.h:271
@ ALPM_ERR_HANDLE_NOT_NULL
Handle should not be null.
Definition alpm.h:226
@ ALPM_ERR_HANDLE_NULL
Handle should be null.
Definition alpm.h:224
@ ALPM_ERR_DB_NOT_FOUND
The database could not be found.
Definition alpm.h:239
@ ALPM_ERR_TRANS_HOOK_FAILED
A hook failed to run.
Definition alpm.h:275
@ ALPM_ERR_HANDLE_LOCK
Failed to acquire lock.
Definition alpm.h:228
@ ALPM_ERR_DB_INVALID_SIG
Database has an invalid signature.
Definition alpm.h:243
@ ALPM_ERR_INVALID_REGEX
Invalid Regex.
Definition alpm.h:313
@ ALPM_ERR_NOT_A_FILE
Should be a file.
Definition alpm.h:215
@ ALPM_ERR_TRANS_DUP_TARGET
Duplicate target in transaction.
Definition alpm.h:261
@ ALPM_ERR_PKG_MISSING_SIG
Package does not have a signature.
Definition alpm.h:288
@ ALPM_ERR_PKG_INVALID
Package is invalid.
Definition alpm.h:282
@ ALPM_ERR_NOT_A_DIR
Should be a directory.
Definition alpm.h:217
@ ALPM_ERR_SERVER_BAD_URL
Server URL is in an invalid format.
Definition alpm.h:252
@ ALPM_ERR_LIBCURL
Error in libcurl.
Definition alpm.h:318
@ ALPM_ERR_PKG_INVALID_NAME
Package has an invalid name.
Definition alpm.h:294
@ ALPM_ERR_SERVER_NONE
The database has no configured servers.
Definition alpm.h:254
@ ALPM_ERR_DB_INVALID
Database is invalid.
Definition alpm.h:241
@ ALPM_ERR_TRANS_NOT_INITIALIZED
A transaction has not been initialized.
Definition alpm.h:265
@ ALPM_ERR_DISK_SPACE
Insufficient disk space.
Definition alpm.h:221
@ ALPM_ERR_FILE_CONFLICTS
Files conflict.
Definition alpm.h:308
@ ALPM_ERR_WRONG_ARGS
Function was called with invalid arguments.
Definition alpm.h:219
@ ALPM_ERR_PKG_CANT_REMOVE
Failed to remove package files.
Definition alpm.h:292
@ ALPM_ERR_PKG_INVALID_CHECKSUM
Package has an invalid checksum.
Definition alpm.h:284
@ ALPM_ERR_DB_NOT_NULL
Database should be null.
Definition alpm.h:237
char * name
Name of the file (without .pacsave extension)
Definition alpm.h:154
off_t size
Size of the file.
Definition alpm.h:138
char * hash
Hash of the filename (used internally)
Definition alpm.h:156
alpm_file_t * files
An array of files.
Definition alpm.h:148
size_t count
Amount of files in the array.
Definition alpm.h:146
char * name
Name of the file.
Definition alpm.h:136
mode_t mode
The file's permissions.
Definition alpm.h:140
alpm_file_t * alpm_filelist_contains(const alpm_filelist_t *filelist, const char *path)
Determines whether a package filelist contains a given path.
Definition filelist.c:121
Local package or package file backup entry.
Definition alpm.h:152
File in a package.
Definition alpm.h:134
Package filelist container.
Definition alpm.h:144
char * name
group name
Definition alpm.h:181
alpm_list_t * packages
list of alpm_pkg_t packages
Definition alpm.h:183
alpm_list_t * alpm_find_group_pkgs(alpm_list_t *dbs, const char *name)
Find group members across a list of databases.
Definition sync.c:255
Package group.
Definition alpm.h:179
alpm_handle_t * alpm_initialize(const char *root, const char *dbpath, alpm_errno_t *err)
Initializes the library.
Definition alpm.c:35
int alpm_release(alpm_handle_t *handle)
Release the library.
Definition alpm.c:98
A doubly linked list.
Definition alpm_list.h:51
alpm_loglevel_t
Logging Levels.
Definition alpm.h:1494
void(* alpm_cb_log)(void *ctx, alpm_loglevel_t level, const char *fmt, va_list args)
The callback type for logging.
Definition alpm.h:1516
int alpm_logaction(alpm_handle_t *handle, const char *prefix, const char *fmt,...) __attribute__((format(printf
A printf-like function for logging.
@ ALPM_LOG_WARNING
Warning.
Definition alpm.h:1498
@ ALPM_LOG_ERROR
Error.
Definition alpm.h:1496
@ ALPM_LOG_DEBUG
Debug.
Definition alpm.h:1500
@ ALPM_LOG_FUNCTION
Function.
Definition alpm.h:1502
char * alpm_compute_md5sum(const char *filename)
Get the md5 sum of file.
Definition util.c:1141
int alpm_unlock(alpm_handle_t *handle)
Remove the database lock file.
Definition handle.c:144
int alpm_capabilities(void)
Get the capabilities of the library.
Definition alpm.c:114
int64_t alpm_time_t
The time type used by libalpm.
Definition alpm.h:126
alpm_caps
Enum of possible compile time features.
Definition alpm.h:2951
char * alpm_compute_sha256sum(const char *filename)
Get the sha256 sum of file.
Definition util.c:1154
const char * alpm_version(void)
Get the version of library.
Definition alpm.c:109
alpm_pkg_t * alpm_sync_get_new_version(alpm_pkg_t *pkg, alpm_list_t *dbs_sync)
Check for new version of pkg in syncdbs.
Definition sync.c:56
int alpm_sandbox_setup_child(alpm_handle_t *handle, const char *sandboxuser, const char *sandbox_path)
Drop privileges by switching to a different user.
Definition sandbox.c:32
@ ALPM_CAPABILITY_DOWNLOADER
Ability to download.
Definition alpm.h:2955
@ ALPM_CAPABILITY_NLS
localization
Definition alpm.h:2953
@ ALPM_CAPABILITY_SIGNATURES
Signature checking.
Definition alpm.h:2957
int alpm_option_set_ignorepkgs(alpm_handle_t *handle, alpm_list_t *ignorepkgs)
Sets the list of packages to ignore.
Definition handle.c:699
int alpm_option_set_disable_dl_timeout(alpm_handle_t *handle, unsigned short disable_dl_timeout)
Enables/disables the download timeout.
Definition handle.c:938
const char * alpm_option_get_dbext(alpm_handle_t *handle)
Gets the configured database extension.
Definition handle.c:356
int alpm_option_remove_noextract(alpm_handle_t *handle, const char *path)
Remove an entry from the no-extract list.
Definition handle.c:684
alpm_list_t * alpm_option_get_cachedirs(alpm_handle_t *handle)
Gets the currently configured cachedirs,.
Definition handle.c:272
int alpm_option_set_ignoregroups(alpm_handle_t *handle, alpm_list_t *ignoregrps)
Sets the list of groups to ignore.
Definition handle.c:714
int alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace)
Enable/disable checking free space before installing packages.
Definition handle.c:845
const char * alpm_option_get_root(alpm_handle_t *handle)
Returns the root path.
Definition handle.c:254
int alpm_option_set_logfile(alpm_handle_t *handle, const char *logfile)
Sets the logfile path.
Definition handle.c:569
int alpm_option_remove_hookdir(alpm_handle_t *handle, const char *hookdir)
Remove a hookdir from the configured hookdirs.
Definition handle.c:495
int alpm_option_set_noupgrades(alpm_handle_t *handle, alpm_list_t *noupgrade)
Sets the list of no-upgrade files.
Definition handle.c:659
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.
Definition handle.c:669
int alpm_option_remove_assumeinstalled(alpm_handle_t *handle, const alpm_depend_t *dep)
Remove an entry from the assume installed list.
Definition handle.c:793
void * alpm_option_get_fetchcb_ctx(alpm_handle_t *handle)
Returns the downloading callback.
Definition handle.c:212
int alpm_option_add_architecture(alpm_handle_t *handle, const char *arch)
Adds an allowed package architecture.
Definition handle.c:807
alpm_list_t * alpm_option_get_hookdirs(alpm_handle_t *handle)
Gets the currently configured hookdirs,.
Definition handle.c:266
int alpm_option_get_checkspace(alpm_handle_t *handle)
Get whether or not checking for free space before installing packages is enabled.
Definition handle.c:350
alpm_cb_progress alpm_option_get_progresscb(alpm_handle_t *handle)
Returns the callback used for operation progress.
Definition handle.c:242
void * alpm_option_get_questioncb_ctx(alpm_handle_t *handle)
Returns the callback used for questions.
Definition handle.c:236
const char * alpm_option_get_gpgdir(alpm_handle_t *handle)
Returns the path to libalpm's GnuPG home directory.
Definition handle.c:290
int alpm_option_set_architectures(alpm_handle_t *handle, alpm_list_t *arches)
Sets the allowed package architecture.
Definition handle.c:813
void * alpm_option_get_dlcb_ctx(alpm_handle_t *handle)
Returns the callback used to report download progress.
Definition handle.c:200
int alpm_option_add_ignoregroup(alpm_handle_t *handle, const char *grp)
Add a file to the ignored group list.
Definition handle.c:709
const char * alpm_option_get_lockfile(alpm_handle_t *handle)
Get the name of the database lock file.
Definition handle.c:284
alpm_list_t * alpm_option_get_overwrite_files(alpm_handle_t *handle)
Gets the currently configured overwritable files,.
Definition handle.c:332
int alpm_option_set_cachedirs(alpm_handle_t *handle, alpm_list_t *cachedirs)
Sets the cachedirs.
Definition handle.c:533
int alpm_option_set_remote_file_siglevel(alpm_handle_t *handle, int level)
Set the remote file siglevel.
Definition handle.c:914
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.
Definition handle.c:946
alpm_cb_log alpm_option_get_logcb(alpm_handle_t *handle)
Returns the callback used for logging.
Definition handle.c:182
alpm_cb_fetch alpm_option_get_fetchcb(alpm_handle_t *handle)
Returns the downloading callback.
Definition handle.c:206
const char * alpm_option_get_logfile(alpm_handle_t *handle)
Gets the filepath to the currently set logfile.
Definition handle.c:278
int alpm_option_remove_cachedir(alpm_handle_t *handle, const char *cachedir)
Remove a cachedir from the configured cachedirs.
Definition handle.c:549
void * alpm_option_get_logcb_ctx(alpm_handle_t *handle)
Returns the callback used for logging.
Definition handle.c:188
alpm_list_t * alpm_option_get_ignorepkgs(alpm_handle_t *handle)
Get the list of ignored packages.
Definition handle.c:320
int alpm_option_set_hookdirs(alpm_handle_t *handle, alpm_list_t *hookdirs)
Sets the hookdirs.
Definition handle.c:479
int alpm_option_get_remote_file_siglevel(alpm_handle_t *handle)
Get the configured remote file siglevel.
Definition handle.c:928
int alpm_option_get_default_siglevel(alpm_handle_t *handle)
Get the default siglevel.
Definition handle.c:884
int alpm_option_add_noupgrade(alpm_handle_t *handle, const char *path)
Add a file to the no-upgrade list.
Definition handle.c:654
int alpm_option_set_dbext(alpm_handle_t *handle, const char *dbext)
Sets the database extension.
Definition handle.c:852
alpm_cb_event alpm_option_get_eventcb(alpm_handle_t *handle)
Returns the callback used for events.
Definition handle.c:218
void * alpm_option_get_progresscb_ctx(alpm_handle_t *handle)
Returns the callback used for operation progress.
Definition handle.c:248
int alpm_option_set_logcb(alpm_handle_t *handle, alpm_cb_log cb, void *ctx)
Sets the callback used for logging.
Definition handle.c:368
int alpm_option_add_cachedir(alpm_handle_t *handle, const char *cachedir)
Append a cachedir to the configured cachedirs.
Definition handle.c:515
int alpm_option_set_assumeinstalled(alpm_handle_t *handle, alpm_list_t *deps)
Sets the list of dependencies that are assumed to be met.
Definition handle.c:753
int alpm_option_get_usesyslog(alpm_handle_t *handle)
Returns whether to use syslog (0 is FALSE, TRUE otherwise).
Definition handle.c:302
int alpm_option_remove_architecture(alpm_handle_t *handle, const char *arch)
Removes an allowed package architecture.
Definition handle.c:821
int alpm_option_remove_ignorepkg(alpm_handle_t *handle, const char *pkg)
Remove an entry from the ignorepkg list.
Definition handle.c:704
int alpm_option_remove_noupgrade(alpm_handle_t *handle, const char *path)
Remove an entry from the no-upgrade list.
Definition handle.c:664
alpm_list_t * alpm_option_get_noextracts(alpm_handle_t *handle)
Get the list of no-extract files.
Definition handle.c:314
int alpm_option_set_eventcb(alpm_handle_t *handle, alpm_cb_event cb, void *ctx)
Sets the callback used for events.
Definition handle.c:392
int alpm_option_set_fetchcb(alpm_handle_t *handle, alpm_cb_fetch cb, void *ctx)
Sets the downloading callback.
Definition handle.c:384
alpm_list_t * alpm_option_get_ignoregroups(alpm_handle_t *handle)
Get the list of ignored groups.
Definition handle.c:326
int alpm_option_add_hookdir(alpm_handle_t *handle, const char *hookdir)
Append a hookdir to the configured hookdirs.
Definition handle.c:463
int alpm_option_set_default_siglevel(alpm_handle_t *handle, int level)
Set the default siglevel.
Definition handle.c:867
int alpm_option_add_assumeinstalled(alpm_handle_t *handle, const alpm_depend_t *dep)
Add a depend to the assumed installed list.
Definition handle.c:739
int alpm_option_set_progresscb(alpm_handle_t *handle, alpm_cb_progress cb, void *ctx)
Sets the callback used for operation progress.
Definition handle.c:408
int alpm_option_set_sandboxuser(alpm_handle_t *handle, const char *sandboxuser)
Sets the user to switch to for sensitive operations.
Definition handle.c:605
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.
Definition handle.c:689
int alpm_option_remove_overwrite_file(alpm_handle_t *handle, const char *glob)
Remove a file glob from the configured overwritable files globs.
Definition handle.c:734
const char * alpm_option_get_dbpath(alpm_handle_t *handle)
Returns the path to the database directory.
Definition handle.c:260
alpm_list_t * alpm_option_get_assumeinstalled(alpm_handle_t *handle)
Gets the list of dependencies that are assumed to be met.
Definition handle.c:338
int alpm_option_set_local_file_siglevel(alpm_handle_t *handle, int level)
Set the local file siglevel.
Definition handle.c:890
int alpm_option_set_usesyslog(alpm_handle_t *handle, int usesyslog)
Sets whether to use syslog (0 is FALSE, TRUE otherwise).
Definition handle.c:618
int alpm_option_remove_ignoregroup(alpm_handle_t *handle, const char *grp)
Remove an entry from the ignoregroup list.
Definition handle.c:719
int alpm_option_set_gpgdir(alpm_handle_t *handle, const char *gpgdir)
Sets the path to libalpm's GnuPG home directory.
Definition handle.c:594
int alpm_option_add_noextract(alpm_handle_t *handle, const char *path)
Add a file to the no-extract list.
Definition handle.c:674
int alpm_option_get_local_file_siglevel(alpm_handle_t *handle)
Get the configured local file siglevel.
Definition handle.c:904
int alpm_option_set_questioncb(alpm_handle_t *handle, alpm_cb_question cb, void *ctx)
Sets the callback used for questions.
Definition handle.c:400
alpm_cb_download alpm_option_get_dlcb(alpm_handle_t *handle)
Returns the callback used to report download progress.
Definition handle.c:194
int alpm_option_set_noextracts(alpm_handle_t *handle, alpm_list_t *noextract)
Sets the list of no-extract files.
Definition handle.c:679
void * alpm_option_get_eventcb_ctx(alpm_handle_t *handle)
Returns the callback used for events.
Definition handle.c:224
alpm_list_t * alpm_option_get_architectures(alpm_handle_t *handle)
Returns the allowed package architecture.
Definition handle.c:344
const char * alpm_option_get_sandboxuser(alpm_handle_t *handle)
Returns the user to switch to for sensitive operations.
Definition handle.c:296
int alpm_option_set_dlcb(alpm_handle_t *handle, alpm_cb_download cb, void *ctx)
Sets the callback used to report download progress.
Definition handle.c:376
alpm_list_t * alpm_option_get_noupgrades(alpm_handle_t *handle)
Get the list of no-upgrade files.
Definition handle.c:308
int alpm_option_set_overwrite_files(alpm_handle_t *handle, alpm_list_t *globs)
Sets the overwritable files.
Definition handle.c:729
alpm_cb_question alpm_option_get_questioncb(alpm_handle_t *handle)
Returns the callback used for questions.
Definition handle.c:230
int alpm_option_add_ignorepkg(alpm_handle_t *handle, const char *pkg)
Add a file to the ignored package list.
Definition handle.c:694
int alpm_option_set_disable_sandbox(alpm_handle_t *handle, unsigned short disable_sandbox)
Enables/disables the sandbox.
Definition handle.c:955
int alpm_option_add_overwrite_file(alpm_handle_t *handle, const char *glob)
Append an overwritable file to the configured overwritable files.
Definition handle.c:724
int alpm_option_get_parallel_downloads(alpm_handle_t *handle)
Gets the number of parallel streams to download database and package files.
Definition handle.c:362
alpm_pkgreason_t
Package install reasons.
Definition alpm.h:2328
alpm_pkgreason_t alpm_pkg_get_reason(alpm_pkg_t *pkg)
Returns the package installation reason.
Definition package.c:339
size_t alpm_pkg_changelog_read(void *ptr, size_t size, const alpm_pkg_t *pkg, void *fp)
Read data from an open changelog 'file stream'.
Definition package.c:447
const char * alpm_pkg_get_packager(alpm_pkg_t *pkg)
Returns the packager's name.
Definition package.c:252
int alpm_pkg_mtree_next(const alpm_pkg_t *pkg, struct archive *archive, struct archive_entry **entry)
Read next entry from a package mtree file.
Definition package.c:469
alpm_time_t alpm_pkg_get_builddate(alpm_pkg_t *pkg)
Returns the build timestamp of the package.
Definition package.c:238
alpm_list_t * alpm_pkg_get_depends(alpm_pkg_t *pkg)
Returns the list of package dependencies as alpm_depend_t.
Definition package.c:367
alpm_list_t * alpm_pkg_get_xdata(alpm_pkg_t *pkg)
Gets the extended data field of a package.
Definition package.c:491
alpm_list_t * alpm_pkg_get_provides(alpm_pkg_t *pkg)
Returns the list of packages provided by pkg.
Definition package.c:402
int alpm_pkg_free(alpm_pkg_t *pkg)
Free a package.
Definition package.c:38
const char * alpm_pkg_get_name(alpm_pkg_t *pkg)
Returns the package name.
Definition package.c:203
alpm_list_t * alpm_pkg_get_makedepends(alpm_pkg_t *pkg)
Returns a list of package make dependencies.
Definition package.c:388
int alpm_fetch_pkgurl(alpm_handle_t *handle, const alpm_list_t *urls, alpm_list_t **fetched)
Fetch a list of remote packages.
Definition dload.c:1285
alpm_list_t * alpm_pkg_compute_requiredby(alpm_pkg_t *pkg)
Computes the list of packages requiring a given package.
Definition package.c:554
int alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg)
Test if a package should be ignored.
Definition package.c:829
const char * alpm_pkg_get_md5sum(alpm_pkg_t *pkg)
Returns the package's MD5 checksum as a string.
Definition package.c:259
int alpm_pkg_has_scriptlet(alpm_pkg_t *pkg)
Returns whether the package has an install scriptlet.
Definition package.c:484
alpm_list_t * alpm_pkg_get_licenses(alpm_pkg_t *pkg)
Returns the list of package licenses.
Definition package.c:353
off_t alpm_pkg_get_isize(alpm_pkg_t *pkg)
Returns the installed size of the package.
Definition package.c:332
alpm_filelist_t * alpm_pkg_get_files(alpm_pkg_t *pkg)
Returns the list of files installed by pkg.
Definition package.c:416
alpm_list_t * alpm_pkg_compute_optionalfor(alpm_pkg_t *pkg)
Computes the list of packages optionally requiring a given package.
Definition package.c:559
off_t alpm_pkg_get_size(alpm_pkg_t *pkg)
Returns the size of the package.
Definition package.c:325
alpm_handle_t * alpm_pkg_get_handle(alpm_pkg_t *pkg)
Gets the handle of a package.
Definition package.c:197
alpm_list_t * alpm_pkg_get_backup(alpm_pkg_t *pkg)
Returns the list of files backed up when installing pkg.
Definition package.c:423
int alpm_pkg_load(alpm_handle_t *handle, const char *filename, int full, int level, alpm_pkg_t **pkg)
Create a package from a file.
Definition be_package.c:725
const char * alpm_pkg_get_version(alpm_pkg_t *pkg)
Returns the package version as a string.
Definition package.c:210
alpm_pkgfrom_t
Location a package object was loaded from.
Definition alpm.h:2338
int alpm_pkg_get_validation(alpm_pkg_t *pkg)
Returns the method used to validate a package during install.
Definition package.c:346
alpm_pkgvalidation_t
Method used to validate a package.
Definition alpm.h:2349
const char * alpm_pkg_get_arch(alpm_pkg_t *pkg)
Returns the architecture for which the package was built.
Definition package.c:318
off_t alpm_pkg_download_size(alpm_pkg_t *newpkg)
Returns the size of the files that will be downloaded to install a package.
Definition sync.c:689
const char * alpm_pkg_get_filename(alpm_pkg_t *pkg)
Gets the name of the file from which the package was loaded.
Definition package.c:183
alpm_list_t * alpm_pkg_get_conflicts(alpm_pkg_t *pkg)
Returns the list of packages conflicting with pkg.
Definition package.c:395
alpm_db_t * alpm_pkg_get_db(alpm_pkg_t *pkg)
Returns the database containing pkg.
Definition package.c:430
int alpm_pkg_vercmp(const char *a, const char *b)
Compare two version strings and determine which one is 'newer'.
Definition version.c:219
void * alpm_pkg_changelog_open(alpm_pkg_t *pkg)
Open a package changelog for reading.
Definition package.c:440
const char * alpm_pkg_get_base64_sig(alpm_pkg_t *pkg)
Returns the base64 encoded package signature.
Definition package.c:273
alpm_list_t * alpm_pkg_get_replaces(alpm_pkg_t *pkg)
Returns the list of packages to be replaced by pkg.
Definition package.c:409
alpm_pkg_t * alpm_pkg_find(alpm_list_t *haystack, const char *needle)
Find a package in a list by name.
Definition package.c:801
int alpm_pkg_get_sig(alpm_pkg_t *pkg, unsigned char **sig, size_t *sig_len)
Extracts package signature either from embedded package signature or if it is absent then reads data ...
Definition package.c:280
const char * alpm_pkg_get_base(alpm_pkg_t *pkg)
Returns the package base name.
Definition package.c:190
const char * alpm_pkg_get_desc(alpm_pkg_t *pkg)
Returns the package description.
Definition package.c:224
const char * alpm_pkg_get_sha256sum(alpm_pkg_t *pkg)
Returns the package's SHA256 checksum as a string.
Definition package.c:266
alpm_time_t alpm_pkg_get_installdate(alpm_pkg_t *pkg)
Returns the install timestamp of the package.
Definition package.c:245
alpm_pkgfrom_t alpm_pkg_get_origin(alpm_pkg_t *pkg)
Returns the origin of the package.
Definition package.c:217
alpm_list_t * alpm_pkg_get_checkdepends(alpm_pkg_t *pkg)
Returns a list of package check dependencies.
Definition package.c:381
int alpm_pkg_mtree_close(const alpm_pkg_t *pkg, struct archive *archive)
Close a package mtree file.
Definition package.c:477
int alpm_pkg_set_reason(alpm_pkg_t *pkg, alpm_pkgreason_t reason)
Set install reason for a package in the local database.
Definition be_local.c:1184
struct archive * alpm_pkg_mtree_open(alpm_pkg_t *pkg)
Open a package mtree file for reading.
Definition package.c:462
int alpm_pkg_changelog_close(const alpm_pkg_t *pkg, void *fp)
Close a package changelog for reading.
Definition package.c:455
alpm_list_t * alpm_pkg_get_groups(alpm_pkg_t *pkg)
Returns the list of package groups.
Definition package.c:360
const char * alpm_pkg_get_url(alpm_pkg_t *pkg)
Returns the package URL.
Definition package.c:231
int alpm_pkg_checkmd5sum(alpm_pkg_t *pkg)
Check the integrity (with md5) of a package from the sync cache.
Definition package.c:50
alpm_list_t * alpm_pkg_get_optdepends(alpm_pkg_t *pkg)
Returns the list of package optional dependencies.
Definition package.c:374
@ ALPM_PKG_REASON_EXPLICIT
Explicitly requested by the user.
Definition alpm.h:2330
@ ALPM_PKG_REASON_UNKNOWN
Failed parsing of local database.
Definition alpm.h:2334
@ ALPM_PKG_REASON_DEPEND
Installed as a dependency for another package.
Definition alpm.h:2332
@ ALPM_PKG_FROM_FILE
Loaded from a file via alpm_pkg_load.
Definition alpm.h:2340
@ ALPM_PKG_FROM_LOCALDB
From the local database.
Definition alpm.h:2342
@ ALPM_PKG_FROM_SYNCDB
From a sync database.
Definition alpm.h:2344
@ ALPM_PKG_VALIDATION_MD5SUM
The package is validated with md5.
Definition alpm.h:2355
@ ALPM_PKG_VALIDATION_SIGNATURE
The package is validated with a PGP signature.
Definition alpm.h:2359
@ ALPM_PKG_VALIDATION_NONE
The package does not have any validation.
Definition alpm.h:2353
@ ALPM_PKG_VALIDATION_SHA256SUM
The package is validated with sha256.
Definition alpm.h:2357
@ ALPM_PKG_VALIDATION_UNKNOWN
The package's validation type is unknown.
Definition alpm.h:2351
alpm_sigvalidity_t validity
The validity of the signature.
Definition alpm.h:473
alpm_time_t created
When the key was created.
Definition alpm.h:446
char pubkey_algo
A character representing the encryption algorithm used by the public key.
Definition alpm.h:460
unsigned int revoked
has the key been revoked
Definition alpm.h:452
void * data
The actual key data.
Definition alpm.h:436
unsigned int length
The length of the key.
Definition alpm.h:450
char * email
Email of the key's owner.
Definition alpm.h:444
char * fingerprint
The key's fingerprint.
Definition alpm.h:438
char * uid
UID of the key.
Definition alpm.h:440
alpm_pgpkey_t key
The key of the signature.
Definition alpm.h:469
alpm_sigstatus_t status
The status of the signature.
Definition alpm.h:471
char * name
Name of the key's owner.
Definition alpm.h:442
size_t count
The amount of results in the array.
Definition alpm.h:482
alpm_sigresult_t * results
An array of sigresults.
Definition alpm.h:484
alpm_time_t expires
When the key expires.
Definition alpm.h:448
int alpm_decode_signature(const char *base64_data, unsigned char **data, size_t *data_len)
Decode a loaded signature in base64 form.
Definition signing.c:38
alpm_sigvalidity_t
The trust level of a PGP key.
Definition alpm.h:422
alpm_sigstatus_t
PGP signature verification status return codes.
Definition alpm.h:405
int alpm_db_check_pgp_signature(alpm_db_t *db, alpm_siglist_t *siglist)
Check the PGP signature for the given database.
Definition signing.c:1011
int alpm_pkg_check_pgp_signature(alpm_pkg_t *pkg, alpm_siglist_t *siglist)
Check the PGP signature for the given package file.
Definition signing.c:1000
int alpm_extract_keyid(alpm_handle_t *handle, const char *identifier, const unsigned char *sig, const size_t len, alpm_list_t **keys)
Extract the Issuer Key ID from a signature.
Definition signing.c:1101
int alpm_siglist_cleanup(alpm_siglist_t *siglist)
Clean up and free a signature result list.
Definition signing.c:1021
alpm_siglevel_t
PGP signature verification options.
Definition alpm.h:379
@ ALPM_SIGVALIDITY_FULL
The signature is fully trusted.
Definition alpm.h:424
@ ALPM_SIGVALIDITY_MARGINAL
The signature is marginally trusted.
Definition alpm.h:426
@ ALPM_SIGVALIDITY_NEVER
The signature is never trusted.
Definition alpm.h:428
@ ALPM_SIGVALIDITY_UNKNOWN
The signature has unknown trust.
Definition alpm.h:430
@ ALPM_SIGSTATUS_SIG_EXPIRED
The signature has expired.
Definition alpm.h:411
@ ALPM_SIGSTATUS_VALID
Signature is valid.
Definition alpm.h:407
@ ALPM_SIGSTATUS_KEY_EXPIRED
The key has expired.
Definition alpm.h:409
@ ALPM_SIGSTATUS_KEY_UNKNOWN
The key is not in the keyring.
Definition alpm.h:413
@ ALPM_SIGSTATUS_INVALID
The signature is invalid.
Definition alpm.h:417
@ ALPM_SIGSTATUS_KEY_DISABLED
The key has been disabled.
Definition alpm.h:415
@ ALPM_SIG_DATABASE_MARGINAL_OK
Allow databases with signatures that are marginal trust.
Definition alpm.h:396
@ ALPM_SIG_DATABASE_OPTIONAL
Databases do not require a signature, but check databases that do have signatures.
Definition alpm.h:394
@ ALPM_SIG_USE_DEFAULT
The Default siglevel.
Definition alpm.h:401
@ ALPM_SIG_DATABASE
Databases require a signature.
Definition alpm.h:391
@ ALPM_SIG_PACKAGE_MARGINAL_OK
Definition alpm.h:386
@ ALPM_SIG_DATABASE_UNKNOWN_OK
Allow databases with signatures that are unknown trust.
Definition alpm.h:398
@ ALPM_SIG_PACKAGE
Packages require a signature.
Definition alpm.h:381
@ ALPM_SIG_PACKAGE_OPTIONAL
Packages do not require a signature, but check packages that do have signatures.
Definition alpm.h:384
@ ALPM_SIG_PACKAGE_UNKNOWN_OK
Allow packages with signatures that are unknown trust.
Definition alpm.h:388
A PGP key.
Definition alpm.h:434
Signature list.
Definition alpm.h:480
Signature result.
Definition alpm.h:467
int alpm_trans_interrupt(alpm_handle_t *handle)
Interrupt a transaction.
Definition trans.c:247
int alpm_add_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
Add a package to the transaction.
Definition add.c:50
alpm_transflag_t
Transaction flags.
Definition alpm.h:2790
int alpm_trans_prepare(alpm_handle_t *handle, alpm_list_t **data)
Prepare a transaction.
Definition trans.c:109
int alpm_trans_init(alpm_handle_t *handle, int flags)
Initialize the transaction.
Definition trans.c:45
alpm_list_t * alpm_trans_get_remove(alpm_handle_t *handle)
Returns the list of packages removed by the transaction.
Definition trans.c:445
int alpm_remove_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
Add a package removal to the transaction.
Definition remove.c:49
int alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
Commit a transaction.
Definition trans.c:167
int alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
Search for packages to upgrade and add them to the transaction.
Definition sync.c:200
int alpm_trans_get_flags(alpm_handle_t *handle)
Returns the bitfield of flags for the current transaction.
Definition trans.c:427
alpm_list_t * alpm_trans_get_add(alpm_handle_t *handle)
Returns a list of packages added by the transaction.
Definition trans.c:436
int alpm_trans_release(alpm_handle_t *handle)
Release a transaction.
Definition trans.c:264
@ ALPM_TRANS_FLAG_NODEPS
Ignore dependency checks.
Definition alpm.h:2792
@ ALPM_TRANS_FLAG_NOHOOKS
Do not run hooks during a transaction.
Definition alpm.h:2805
@ ALPM_TRANS_FLAG_RECURSE
Remove packages and their unneeded deps (not explicitly installed).
Definition alpm.h:2801
@ ALPM_TRANS_FLAG_NODEPVERSION
Ignore version numbers when checking dependencies.
Definition alpm.h:2797
@ ALPM_TRANS_FLAG_NOSAVE
Delete files even if they are tagged as backup.
Definition alpm.h:2795
@ ALPM_TRANS_FLAG_NOCONFLICTS
Ignore dependency conflicts.
Definition alpm.h:2813
@ ALPM_TRANS_FLAG_NOSCRIPTLET
Do not execute install scriptlets after installing.
Definition alpm.h:2811
@ ALPM_TRANS_FLAG_NEEDED
Do not install a package if it is already installed and up to date.
Definition alpm.h:2816
@ ALPM_TRANS_FLAG_UNNEEDED
Do not remove a package if it is needed by another one.
Definition alpm.h:2820
@ ALPM_TRANS_FLAG_ALLDEPS
Use ALPM_PKG_REASON_DEPEND when installing packages.
Definition alpm.h:2807
@ ALPM_TRANS_FLAG_RECURSEALL
Remove also explicitly installed unneeded deps (use with ALPM_TRANS_FLAG_RECURSE).
Definition alpm.h:2822
@ ALPM_TRANS_FLAG_CASCADE
Remove also any packages depending on a package being removed.
Definition alpm.h:2799
@ ALPM_TRANS_FLAG_ALLEXPLICIT
Use ALPM_PKG_REASON_EXPLICIT when installing packages.
Definition alpm.h:2818
@ ALPM_TRANS_FLAG_NOLOCK
Do not lock the database during the operation.
Definition alpm.h:2824
@ ALPM_TRANS_FLAG_DBONLY
Modify database but do not commit changes to the filesystem.
Definition alpm.h:2803
@ ALPM_TRANS_FLAG_DOWNLOADONLY
Only download packages and do not actually install.
Definition alpm.h:2809
char * name
Definition alpm.h:120
char * value
Definition alpm.h:121
The extended data type used to store non-standard package data fields.
Definition alpm.h:119
alpm_loglevel_t const char va_list args
Definition sandbox.h:40
alpm_loglevel_t level
Definition sandbox.h:40
__attribute__((format(printf, 3, 0))) void _alpm_sandbox_cb_log(void *ctx
alpm_loglevel_t const char * fmt
Definition sandbox.h:40