1ALPM library overview & internals 2================================= 3 4Here is a list of the main objects and files from the ALPM (i.e. Arch Linux 5Package Management) library. This document, while not exhaustive, also 6indicates some limitations (on purpose, or sometimes due to its poor design) of 7the library at the present time. 8 9There is one special file,"alpm.h", which is the public interface that 10should be distributed and installed on systems with the library. Only 11structures, data and functions declared within this file are made available to 12the frontend. Lots of structures are of an opaque type and their fields are 13only accessible in read-only mode, through some clearly defined functions. 14 15In addition to "alpm.h", the interfaces of "alpm_list.h" have also been made 16available to the frontend, for allowing it to manipulate the lists returned by 17the backend. 18 19Several structures and functions have been renamed compared to pacman 2.9 code. 20This was done at first for the sake of naming scheme consistency, and then 21primarily because of potential namespace conflicts between library and frontend 22spaces. Indeed, it is not possible to have two different functions with the 23same name declared in both spaces. To avoid such conflicts, internal function 24names have been prepended with "_alpm_". 25 26In a general manner, public library functions are named "alpm_<type>_<action>" 27(examples: alpm_trans_commit(), alpm_release(), alpm_pkg_get_name(), ...). 28Internal (and thus private) functions should be named "_alpm_XXX" for instance 29(examples: _alpm_needbackup(), _alpm_runscriplet(), ...). Functions defined and 30used inside a single file should be defined as "static". 31 32 33[Initialization] 34 35alpm_initialize() is used to initialize library internals and to create 36a transparent handle object. Before its call, the library can't be used. 37 38alpm_release() just does the opposite (memory used by the library, and the 39handle is freed). After its call, the library is no longer available. 40 41 42[Options] 43 44The library does not use any configuration file. It is up to the front end to 45configure the library as needed; the handle holds a number of configuration 46options instead. 47 48All of the following options have a alpm_option_get_* and alpm_option_set_* 49function for getting and setting the value. They cannot be set before the 50library is initialized. 51 52* logcb: The callback function for "log" operations. 53* dlcb: The callback function for download progress of each package. 54* fetchcb: Callback for custom download function. 55* totaldlcb: The callback function for overall download progress. 56* eventcb: Callback for transaction messages. 57* questioncb: Callback for selecting amongst choices. 58* progresscb: Callback to handle display of transaction progress. 59* gpgdir: Directory where GnuPG files are stored. 60* arch: Allowed package architecture. 61* deltaratio: Download deltas if possible; a ratio value. 62* checkspace: Check disk space before installing. 63* default_siglevel: Default signature verification level. 64* local_file_siglevel: Signature verification level for local file upgrades. 65* remote_file_siglevel: Signature verification level for remote file upgrades. 66* logfile: The base path to pacman's log file (Default: /var/log/pacman.log) 67* usesyslog: Log to syslog instead of `logfile` for file-base logging. 68 69The following options also have `alpm_option_{add,remove}_*` functions, as the 70values are list structures. 71NOTE: The add and remove functions are NOT plural, as they are in English: 72alpm_option_{get,set}_noupgrades -> alpm_option_{add,remove}_noupgrade. 73 74* cachedirs: Paths to pacman's download caches (Default: /var/cache/pacman/pkg) 75* noupgrades: Files which will never be touched by pacman (extracted as .pacnew) 76* noextracts: Files which will never be extracted at all (no .pacnew file) 77* ignorepkgs: Packages to ignore when upgrading. 78* ignoregrps: Groups to ignore when upgrading. 79 80The following options are read-only, having ONLY alpm_option_get_* functions: 81 82* root: The root directory for pacman to install to 83* dbpath: The toplevel database directory 84* lockfile: The file used for locking the database (Default: <dbpath>/db.lck) 85 86 87[Transactions] 88 89The transaction structure permits easy manipulations of several packages 90at a time (i.e. adding, upgrade and removal operations). 91 92A transaction can be initiated with a type (SYNC, UPGRADE or REMOVE), 93and some flags (NODEPS, FORCE, CASCADE, ...). 94 95Note: there can only be one type at a time: a transaction is either 96created to add packages to the system, or either created to remove packages. 97The frontend can't request for mixed operations: it has to run several 98transactions, one at a time, in such a case. 99 100The flags allow to tweak the library behaviour during its resolution. 101Note, that some options of the handle can also modify the behavior of a 102transaction (NOUPGRADE, IGNOREPKG, ...). 103 104Note: once a transaction has been initiated, it is not possible anymore 105to modify its type or its flags. 106 107One can also add some targets to a transaction (alpm_trans_addtarget()). 108These targets represent the list of packages to be handled. 109 110Then, a transaction needs to be prepared (alpm_trans_prepare()). It 111means that the various targets added, will be inspected and challenged 112against the set of already installed packages (dependency checking, etc...) 113 114Last, a callback is associated with each transaction. During the 115transaction resolution, each time a new step is started or done (i.e 116dependency or conflict checking, package adding or removal, ...), the 117callback is called, allowing the frontend to be aware of the progress of 118the resolution. Can be useful to implement a progress bar. 119 120 121[Package Cache] 122 123libalpm maintains two caches for each DB. One is a general package cache, the 124other is a group cache (for package groups). These caches are loaded on demand, 125and freed when the library is. 126 127It is important to note that, as a general rule, package structures should NOT 128be freed manually, as they SHOULD be part of the cache. The cache of a 129database is always updated by the library after an operation changing the 130database content (adding and/or removal of packages). Beware frontends ;) 131 132 133[Package] 134 135The package structure maintains all information for a package. In general, 136packages should never be freed from front-ends, as they should always be part 137of the package cache. 138 139The 'origin' data member indicates whether the package is from a file (i.e. -U 140operations) or from the package cache. In the case of a file, all data members 141available are present in the structure. Packages indicated as being from the 142cache have data members filled on demand. For this reason, the alpm_pkg_get_* 143functions will load the data from the DB as needed. 144 145 146[Errors] 147 148The library provides a global variable pm_errno. 149It aims at being to the library what errno is for C system calls. 150 151Almost all public library functions are returning an integer value: 0 152indicating success, -1 indicating a failure. 153If -1 is returned, the variable pm_errno is set to a meaningful value 154Wise frontends should always care for these returned values. 155 156Note: the helper function alpm_strerror() can also be used to translate one 157specified error code into a more friendly sentence, and alpm_strerrorlast() 158does the same for the last error encountered (represented by pm_errno). 159 160 161[List - alpm_list_t] 162 163The alpm_list_t structure is a doubly-linked list for use with the libalpm 164routines. This type is provided publicly so that frontends are free to use it 165if they have no native list type (C++, glib, python, etc all have list types). 166See the proper man pages for alpm_list_t references. 167 168 169 170PACMAN frontend overview & internals 171==================================== 172 173Here are some words about the frontend responsibilities. 174The library can operate only a small set of well defined operations and 175dummy operations. 176 177High level features are left to the frontend ;) 178 179For instance, during a sysupgrade, the library returns the whole list of 180packages to be upgraded, without any care for its content. 181The frontend can inspect the list and perhaps notice that "pacman" 182itself has to be upgraded. In such a case, the frontend can choose to 183perform a special action. 184 185 186[MAIN] (see pacman.c) 187 188Calls for alpm_initialize(), and alpm_release(). 189Read the configuration file, and parse command line arguments. 190Based on the action requested, it initiates the appropriate transactions 191(see pacman_upgrade(), pacman_remove(), pacman_sync() in files upgrade.c, 192remove.c and sync.c). 193 194 195[CONFIGURATION] (see conf.h) 196 197The frontend is using a configuration file, usually "/etc/pacman.conf". Some 198of these options are only useful for the frontend only (mainly the ones used to 199control the output like totaldownload, or the behavior with cleanmethod and 200syncfirst). The rest is used to configure the library. 201 202 203[UPGRADE/REMOVE/SYNC] 204 205The file pacman.c has been divided into several smaller files, namely 206upgrade.c, remove.c, sync.c and query.c, to hold the big parts: pacman_upgrade, 207pacman_remove, pacman_sync. 208 209These 3 functions have been split to ease the code reading. 210 211 212 213API CHANGES BETWEEN 3.1 AND 3.2 214=============================== 215 216[REMOVED] 217- alpm_db_whatprovides() 218- alpm_splitdep (no longer public) 219- trans->targets was removed, so alpm_trans_get_targets() as well 220- error codes: 221 PM_ERR_OPT_*, PM_ERR_PKG_INSTALLED, PM_ERR_DLT_CORRUPTED, 222 PM_ERR_LIBARCHIVE_ERROR 223- event: PM_TRANS_EVT_EXTRACT_DONE 224- PM_TRANS_TYPE_ADD pmtranstype_t (add transaction) 225- PM_TRANS_FLAG_DEPENDSONLY pmtransflag_t 226 227[CHANGED] 228- alpm_grp_get_pkgs returns with pmpkg_t list, not package-name list 229- Swap parameters on PM_TRANS_CONV_INSTALL_IGNOREPKG callback function 230- download callback API changed: alpm_cb_download, alpm_cb_totaldl split 231 (+ new alpm_option_get_totaldlcb(), alpm_option_set_totaldlcb() functions) 232- unsigned long->off_t changes where size is used 233- pmsyncpkg_t struct changes: 234 - pmsynctype_t and alpm_sync_get_type() were removed 235 - alpm_sync_get_data() was removed 236 - alpm_sync_get_removes() was added 237 238[ADDED] 239- alpm_delta_get_from_md5sum(), alpm_delta_get_to_md5sum() 240- alpm_miss_get_causingpkg() (new causingpkg field in pmdepmissing_t) 241- alpm_checkdbconflicts() 242- alpm_sync_newversion() 243- alpm_deptest() 244- error codes : 245 PM_ERR_DLT_INVALID, PM_ERR_LIBARCHIVE, PM_ERR_LIBDOWNLOAD and 246 PM_ERR_EXTERNAL_DOWNLOAD 247- flags: 248 PM_TRANS_FLAG_ALLEXPLICIT, PM_TRANS_FLAG_UNNEEDED and 249 PM_TRANS_FLAG_RECURSEALL 250 251 252API CHANGES BETWEEN 3.2 AND 3.3 253=============================== 254 255[REMOVED] 256- pmsyncpkg_t struct (pmpkg_t is used for all types of transaction targets): 257 - alpm_sync_get_pkg() 258 - alpm_sync_get_removes() (use alpm_pkg_get_removes() instead) 259- HoldPkg handling (it is the front-end's task): 260 - alpm_option_get_holdpkgs() 261 - alpm_option_add_holdpkg() 262 - alpm_option_set_holdpkgs() 263 - alpm_option_remove_holdpkg() 264 - PM_TRANS_CONV_REMOVE_HOLDPKG conversation 265- Print URIs feature (it is the front-end's task): 266 - flag: PM_TRANS_FLAG_PRINTURIS 267 - event: PM_TRANS_EVT_PRINTURI 268- alpm_delta_get_from_md5sum() and alpm_delta_get_to_md5sum() 269- alpm_sync_sysupgrade() 270- error codes: 271 PM_ERR_TRANS_COMMITING, PM_ERR_TRANS_DOWNLOADING, PM_ERR_PKG_LOAD, 272 PM_ERR_PKG_CANT_FRESH, PM_ERR_GRP_NOT_FOUND, PM_ERR_USER_ABORT, 273 PM_ERR_INTERNAL_ERROR, PM_ERR_DB_SYNC, PM_ERR_PKG_HOLD and 274 PM_ERR_LIBDOWNLOAD 275 276[CHANGED] 277- XferCommand support was removed, any fetch callback function can be defined: 278 - alpm_option_get_xfercommand() and alpm_option_set_xfercommand() were removed 279 - alpm_option_get_fetchcb() and alpm_option_set_fetchcb() were added 280- function renames: 281 - alpm_db_getpkgcache() -> alpm_db_get_pkgcache() 282 - alpm_db_getgrpcache() -> alpm_db_get_grpcache() 283 - alpm_dep_get_string() -> alpm_dep_compute_string() 284 - alpm_get_md5sum() -> alpm_compute_md5sum() 285 - alpm_checkdbconflicts() -> alpm_checkconflicts() 286- alpm_trans_sysupgrade() has a new enable_downgrade parameter 287- alpm_checkdeps() and alpm_checkconflicts() require local package list instead 288 of local database 289- the to-be-upgraded package is passed to the callback function with 290 PM_TRANS_EVT_UPGRADE_START (as the second parameter) 291- the "requiredby" package is never passed to the callback function with 292 PM_TRANS_CONV_INSTALL_IGNOREPKG (the second parameter is always NULL) 293 294[ADDED] 295- alpm_pkg_get_db() 296- alpm_pkg_get_removes() 297- conversation: PM_TRANS_CONV_REMOVE_PKGS (remove unresolvable targets) 298- flag: PM_TRANS_FLAG_NOLOCK (do not lock database) 299- error codes: 300 PM_ERR_SERVER_NONE, PM_ERR_TRANS_NOT_LOCKED, PM_ERR_PKG_IGNORED and 301 PM_ERR_LIBFETCH 302 303 304API CHANGES BETWEEN 3.3 AND 3.4 305=============================== 306 307[REMOVED] 308- pmtranstype_t struct (transaction type), alpm_trans_get_type() 309- alpm_option_get_nopassiveftp(), alpm_option_set_nopassiveftp() 310 311[CHANGED] 312- interface for target loading: 313 - alpm_trans_addtarget() and alpm_trans_sysupgrade() were removed 314 - alpm_sync_target() and alpm_sync_dbtarget() can be used to add a sync target 315 - alpm_sync_sysupgrade() can be used to add outdated packages (for sysupgrade) 316 - alpm_add_target() can be used to add an add/upgrade target 317 - alpm_remove_target() can be used to add a remove target 318- interface for target listing: 319 - alpm_trans_get_pkgs() was removed 320 - alpm_pkg_get_removes() was removed 321 - alpm_trans_get_add() can be used to list add/upgrade/sync targets 322 - alpm_trans_get_remove() can be used to list to-be-removed packages 323- the type parameter of alpm_trans_init() was removed 324- the type of alpm_db_fetch callback function: mtimeold and mtimenew parameters 325 were replaced by force parameter 326- unsigned short -> int changes for Boolean variables 327 328[ADDED] 329- alpm_db_set_pkgreason() 330- alpm_option_get_arch(), alpm_option_set_arch() 331- alpm_option_get_usedelta() 332- alpm_pkg_unused_deltas() 333- alpm_conflict_get_reason() 334- error code: PM_ERR_PKG_INVALID_ARCH 335 336 337API CHANGES BETWEEN 3.4 AND 3.5 338=============================== 339 340[REMOVED] 341- alpm_db_register_local() 342- alpm_pkg_has_force() 343- alpm_depcmp() 344 345[CHANGED] 346- alpm_trans_cb_progress type had some types changed from int to size_t 347- alpm_cb_log format string is now const char * 348- the interface to add/remove targets: 349 - functions take pmpkg_t * rather than char *. 350 - alpm_sync_target() and alpm_sync_dbtarget() are replaced by alpm_add_pkg() 351 - alpm_add_target() is replaced by alpm_add_pkg() 352 - alpm_remove_target() is replaced by alpm_remove_pkg() 353 - packages can come from: 354 - alpm_db_get_pkg() for normal targets 355 - alpm_find_dbs_satisfier() for versioned provisions 356 - alpm_find_grp_pkgs() for groups 357- alpm_deptest() is replaced by the more flexibile alpm_find_satisfier() 358- size_t used for alpm_list_t sizes 359 - return type for alpm_list_count() 360 - parameter type in alpm_list_msort() and alpm_list_nth() 361 362[ADDED] 363- alpm_option_get_checkspace(), alpm_option_set_checkspace() 364- alpm_find_grp_pkgs() 365- alpm_trans_get_flags() 366- error codes: 367 PM_ERR_DISK_SPACE, PM_ERR_WRITE 368- flags 369 PM_TRANS_FLAG_NODEPVERSION, PM_TRANS_EVT_DISKSPACE_START, 370 PM_TRANS_EVT_DISKSPACE_DONE, PM_TRANS_CONV_SELECT_PROVIDER, 371 PM_TRANS_PROGRESS_DISKSPACE_START, PM_TRANS_PROGRESS_INTEGRITY_START 372 373 374API CHANGES BETWEEN 3.5 AND 4.0 375=============================== 376 377[REMOVED] 378- error codes: 379 PM_ERR_LIBFETCH, PM_ERR_WRITE 380- alpm_option_set_root(), alpm_option_set_dbpath() 381- alpm_list_first() 382- alpm_grp_get_name(), alpm_grp_get_pkgs() 383- alpm_delta_get_from(), alpm_delta_get_to(), alpm_delta_get_filename(), 384 alpm_delta_get_md5sum(), alpm_delta_get_size() 385- alpm_miss_get_target(), alpm_miss_get_dep(), alpm_miss_get_causingpkg() 386- alpm_dep_get_mod(), alpm_dep_get_name(), alpm_dep_get_version() 387- alpm_conflict_get_package1(), alpm_conflict_get_package2(), 388 alpm_conflict_get_reason() 389- alpm_fileconflict_get_target(), alpm_fileconflict_get_type(), 390 alpm_fileconflict_get_file(), alpm_fileconflict_get_ctarget() 391- alpm_db_get_url() 392 393[CHANGED] 394- PM_ prefixes for enum values are now ALPM_ 395- pm prefixes for structs and enums are now alpm_ 396- alpm_initialize now has parameters: char *root, char *dbpath, 397 alpm_errno_t *err and returns an alpm_handle_t struct. 398- alpm_release now takes an alpm_handle_t *. 399- alpm_db_register_sync() now requires a extra parameter of a alpm_siglevel_t. 400- alpm_pkg_load() now requires an extra parameter of an alpm_siglevel_t 401- alpm_db_setserver() replaced by alpm_db_set_servers(), alpm_db_add_server(), 402 alpm_db_remove_server() 403- alpm_trans_init() no longer takes callbacks, set those using 404 alpm_option_set_*cb() functions 405- many functions now require a first parameter of an alpm_handle_t *: 406 - alpm_option_get_* 407 - alpm_option_set_* 408 - alpm_option_add_* 409 - alpm_option_remove_* 410 - alpm_trans_* 411 - alpm_add_pkg 412 - alpm_checkconflicts 413 - alpm_checkdeps 414 - alpm_db_register_sync 415 - alpm_db_set_pkgreason 416 - alpm_db_unregister_all 417 - alpm_fetch_pkgurl 418 - alpm_find_dbs_satisfier 419 - alpm_logaction 420 - alpm_pkg_load 421 - alpm_release 422 - alpm_remove_pkg 423 - alpm_sync_sysupgrade 424- several structs are no longer opaque 425 - alpm_conflict_t 426 - alpm_delta_t 427 - alpm_depend_t 428 - alpm_depmissing_t 429 - alpm_depmod_t 430 - alpm_fileconflict_t 431 - alpm_group_t 432 - alpm_pkg_reason_t 433 434[ADDED] 435- option functions: 436 alpm_{get,set}_eventcb(), alpm_option_{get,set}_convcb(), 437 alpm_option_{get,set}_progresscb() 438- package signing functions: 439 alpm_option_get_default_siglevel(), alpm_option_set_default_siglevel(), 440 alpm_option_get_gpgdir(), alpm_option_set_gpgdir(), alpm_db_get_siglevel(), 441 alpm_siglist_cleanup(), alpm_db_check_pgp_signature(), alpm_pkg_check_pgp_signature(), 442 alpm_pkg_get_origin(), alpm_pkg_get_sha256sum(), alpm_pkg_get_base64_sig() 443- list functions: 444 alpm_list_to_array(), alpm_list_previous() 445- structs: 446 alpm_backup_t, alpm_file_t, alpm_filelist_t 447- enums: 448 alpm_siglevel_t, alpm_sigstatus_t, alpm_sigvalidity_t, alpm_pkgfrom_t 449- error codes: 450 ALPM_ERR_DB_INVALID, ALPM_ERR_DB_INVALID_SIG, ALPM_ERR_GPGME, 451 ALPM_ERR_PKG_INVALID_CHECKSUM, ALPM_ERR_PKG_INVALID_SIG, ALPM_ERR_SIG_INVALID, 452 ALPM_ERR_SIG_MISSING 453 454 455API CHANGES BETWEEN 4.0 AND 4.1 456=============================== 457 458[REMOVED] 459- alpm_list_getdata() 460 461[CHANGED] 462- alpm_pkgfrom_t members are now prefixed with ALPM_ 463- alpm_siglevel_t - added members ALPM_SIG_PACKAGE_SET, ALPM_SIG_PACKAGE_TRUST_SET 464- alpm_depend_t - additional desc member 465- alpm_filelist_t - additional resolved_path member 466- alpm_pgpkey_t - added members length, revoked, pubkey_algo 467- alpm_logaction - added caller identifier argument 468- function renaming: 469 - alpm_option_get_localdb -> alpm_get_localdb 470 - alpm_option_get_syncdbs -> alpm_get_syncdbs 471 - alpm_db_register_sync -> alpm_register_syncdb 472 - alpm_db_unregister_all -> alpm_unregister_all_syncdbs 473 - alpm_db_readgroup -> alpm_db_get_group 474 - alpm_db_set_pkgreason -> alpm_pkg_set_reason (handle parameter removed) 475- alpm_time_t typedef used for all times 476 - members of alpm_pgpkey_t 477 - return types of alpm_pkg_get_builddate and alpm_pkg_get_installdate 478- delta options now use required ratio rather than on/off 479 - alpm_option_get_usedelta -> alpm_option_get_deltaratio 480 - alpm_option_set_usedelta -> alpm_option_set_deltaratio 481 482[ADDED] 483- tracking of how a package was validated: 484 - alpm_pkgvalidation_t 485 - alpm_pkg_get_validation() 486- adjustable signature verification levels for upgrade operations: 487 - alpm_option_get_local_file_siglevel() 488 - alpm_option_set_local_file_siglevel() 489 - alpm_option_get_remote_file_siglevel() 490 - alpm_option_set_remote_file_siglevel() 491- sync database usage functions: 492 - alpm_db_usage_t 493 - alpm_db_set_usage() 494 - alpm_db_get_usage() 495- wrapper functions for reading mtree files 496 - alpm_pkg_mtree_open() 497 - alpm_pkg_mtree_next() 498 - alpm_pkg_mtree_close() 499- utility functions 500 - alpm_pkg_find() 501 - alpm_pkg_compute_optionalfor() 502 - alpm_filelist_contains() 503- types 504 - alpm_time_t 505 - alpm_errno_t 506- flags 507 ALPM_EVENT_OPTDEP_REQUIRED, ALPM_EVENT_DATABASE_MISSING, 508 ALPM_EVENT_KEYRING_START, ALPM_EVENT_KEYRING_DONE, ALPM_EVENT_KEY_DOWNLOAD_START, 509 ALPM_EVENT_KEY_DOWNLOAD_DONE, ALPM_PROGRESS_KEYRING_START 510 511 512API CHANGES BETWEEN 4.1 AND 4.2 513=============================== 514 515[CHANGED] 516- alpm_filelist_t - removed member resolved_path 517- alpm_filelist_contains - now returns alpm_file_t 518- event callback 519 - alpm_event_t renamed to alpm_event_type_t 520 - alpm_event_t union added 521 - alpm_event_cb now takes only an alpm_event_t parameter 522 - alpm_event_any_t, alpm_package_operation_t, alpm_event_package_operation_t, 523 alpm_event_optdep_removal_t, alpm_event_delta_patch_t, alpm_event_scriptlet_info_t, 524 alpm_event_database_missing_t, alpm_event_pkgdownload_t, alpm_event_pacnew_created_t, 525 alpm_event_pacsave_created_t, alpm_event_pacorig_created_t added 526 - ALPM_EVENT_*_START -> ALPM_EVENT_PACKAGE_OPERATION_START 527 - ALPM_EVENT_*_DONE -> ALPM_EVENT_PACKAGE_OPERATION_DONE 528- question callback 529 - alpm_question_t renamed to alpm_question_type_t 530 - alpm_question_t union added 531 - alpm_cb_question now takes only an alpm_question_t parameter 532 - alpm_question_any_t, alpm_question_install_ignorepkg_t, alpm_question_replace_t 533 alpm_question_conflict_t, alpm_question_corrupted_t, alpm_question_remove_pkgs_t, 534 alpm_question_select_provider_t, alpm_question_import_key_t added 535 536[ADDED] 537- memory management 538 - alpm_fileconflict_free() 539 - alpm_depmissing_free() 540 - alpm_conflict_free() 541 - alpm_dep_free() 542- database usage 543 - alpm_db_usage_t 544 - alpm_db_set_usage() 545 - alpm_db_get_usage() 546- assume installed 547 - alpm_option_get_assumeinstalled() 548 - alpm_option_add_assumeinstalled() 549 - alpm_option_set_assumeinstalled() 550 - alpm_option_remove_assumeinstalled() 551- using noupgrade/noextract 552 - alpm_option_match_noupgrade() 553 - alpm_option_match_noextract() 554- utility functions 555 - alpm_dep_from_string() 556 - alpm_pkg_should_ignore() 557 - alpm_decode_signature() 558 - alpm_extract_keyid() 559- flags 560 - ALPM_EVENT_RETRIEVE_DONE, ALPM_EVENT_RETRIEVE_FAILED, ALPM_EVENT_PKGDOWNLOAD_START, 561 ALPM_EVENT_PKGDOWNLOAD_DONE, ALPM_EVENT_PKGDOWNLOAD_FAILED, ALPM_EVENT_OPTDEP_REMOVAL, 562 ALPM_EVENT_PACNEW_CREATED, ALPM_EVENT_PACSVAE_CREATED, ALPM_EVENT_PACORIG_CREATED 563 564 565API CHANGES BETWEEN 4.2 AND 5.0 566=============================== 567 568[REMOVED] 569- alpm_siglevel_t - removed members ALPM_SIG_PACKAGE_SET, ALPM_SIG_PACKAGE_TRUST_SET 570- removed .pacorig generation 571 - ALPM_EVENT_PACORIG_CREATED 572 - alpm_event_pacorig_created_t 573 - alpm_event_t.pacorig_created 574 575[ADDED] 576- hook support 577 - alpm_option_get_hookdirs() 578 - alpm_option_set_hookdirs() 579 - alpm_option_add_hookdir() 580 - alpm_option_remove_hookdir() 581 - alpm_event_hook_t, alpm_event_hook_run_t 582 - alpm_hook_when_t 583 - ALPM_EVENT_HOOK_START, ALPM_EVENT_HOOK_DONE 584 - ALPM_EVENT_HOOK_RUN_START, ALPM_EVENT_HOOK_RUN_DONE 585 - ALPM_ERR_TRANS_HOOK_FAILED 586- different database extension support 587 - alpm_option_get_dbext() 588 - alpm_option_set_dbext() 589- pkgbase accessor 590 - alpm_pkg_get_base() 591- transaction events 592 - ALPM_EVENT_TRANSACTION_START, ALPM_EVENT_TRANSACTION_DONE 593- database unlocking 594 - alpm_unlock() 595 596 597API CHANGES BETWEEN 5.0 AND 5.1 598=============================== 599 600[CHANGED] 601- alpm_errno_t - added member ALPM_ERR_OK 602- alpm_siglevel_t - value of ALPM_SIG_USE_DEFAULT changed 603- functions using bitfields return/pass an int instead of an enum 604 - alpm_option_get_default_siglevel() 605 - alpm_option_set_default_siglevel() 606 - alpm_option_get_remote_file_siglevel() 607 - alpm_option_set_remote_file_siglevel() 608 - alpm_register_syncdb() 609 - alpm_db_get_siglevel() 610 - alpm_db_set_usage() 611 - alpm_db_get_usage() 612 - alpm_pkg_load() 613 - alpm_pkg_get_validation() 614 - alpm_trans_get_flags() 615 - alpm_trans_init() 616 - alpm_option_get_local_file_siglevel() 617 - alpm_option_set_local_file_siglevel() 618 619[ADDED] 620- overwrite support 621 - alpm_option_get_overwrite_files() 622 - alpm_option_set_overwrite_files() 623 - alpm_option_add_overwrite_file() 624 - alpm_option_remove_overwrite_file() 625- download timeout control 626 - alpm_option_set_disable_dl_timeout() 627- access make/checkdepends info 628 - alpm_pkg_get_checkdepends() 629 - alpm_pkg_get_makedepends() 630- check pacman capabilities 631 - alpm_capabilities() 632- duplicate and add to list 633 - alpm_list_append_strdup() 634