summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Prefix alpm_transprog_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_transconv_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_transevt_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_transflag_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_loglevel_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_fileconflicttype_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_depmod_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_pkgreason_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* signing: check validity of all available signaturesDan McGee2011-06-30
| | | | | | | | Change the check into a loop over all signatures present and returned by GPGME. Also modify the return values and checks slightly now that I know a little bit more about what type of values are returned. Signed-off-by: Dan McGee <dan@archlinux.org>
* Make alpm_db_get_sigverify_level() publicDan McGee2011-06-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Add an alpm_db_get_valid() public functionDan McGee2011-06-30
| | | | | | This allows one to check if a database is valid or invalid. Signed-off-by: Dan McGee <dan@archlinux.org>
* Make local_db_read() private to the local backendDan McGee2011-06-30
| | | | | | | | | | | | | | | | | | | There is little need to expose the guts of this function even within the library. Make it static in be_local.c, and clean up a few other things since we know exactly where it is being called from: * Remove unnecessary origin checks in _cache_get_*() methods- if you are calling a cache method your package type will be correct. * Remove sanity checks within local_db_read() itself- packages will always have a name and version if they get this far, and the package object will never be NULL either. The one case calling this from outside the backend was in add.c, where we forced a full load of a package before we duplicated it. Move this concern elsewhere and have pkg_dup() always force a full package load via a new force_load() function on the operations callback struct. Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix a few warnings pointed out via clang scan-buildDan McGee2011-06-30
| | | | | | | | | Some of these are legit (the backup hash NULL checks), while others are either extemely unlikely or just impossible for the static code analysis to prove, but are worth adding anyway because they have little overhead. Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge remote-tracking branch 'allan/breakshit'Dan McGee2011-06-30
|\
| * Use ignoregroup rather than ignoregrp in the handleAllan McRae2011-06-29
| | | | | | | | | | | | This matches the naming in pacman.conf. Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename internal functions with grp in their nameAllan McRae2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | | The following function renames take place for the same reasoning as the previous commit: _alpm_grp_new -> _alpm_group_new _alpm_grp_free -> _alpm_group_free _alpm_db_free_grpcache -> _alpm_db_free_groupcache _alpm_db_get_grpfromcache -> _alpm_db_get_groupfromcache Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename public functions with grp in their nameAllan McRae2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using grp instead of group is a small saving at the cost of clarity. Rename the following functions: alpm_option_get_ignoregrps -> alpm_option_get_ignoregroups alpm_option_add_ignoregrp -> alpm_option_add_ignoregroup alpm_option_set_ignoregrps -> alpm_option_set_ignoregroups alpm_option_remove_ignoregrp -> alpm_option_remove_ignoregroup alpm_db_readgrp -> alpm_db_readgroup alpm_db_get_grpcache -> alpm_db_get_groupcache alpm_find_grp_pkgs -> alpm_find_group_pkgs Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename _pmdbstatus_t to _alpm_dbstatus_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmdbinfrq_t to alpm_dbinfrq_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmtransstate_t to alpm_transstate_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmpkghash_t to alpm_pkghash_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmgraph_t to alpm_graph_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmpkgfrom_t to alpm_pkgfrom_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmerrno_t to alpm_errno_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmtransprog_t to alpm_transprog_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmtransconv_t to alpm_transconv_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmtransevt_t to alpm_transevt_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmtransflag_t to alpm_transflag_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmloglevel_t to alpm_loglevel_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmbackup_t to alpm_backup_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmdelta_t to alpm_delta_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmgrp_t to alpm_group_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmfileconflict_t to alpm_fileconflict_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmconflict_t to alpm_conflict_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmdepmissing_t to alpm_depmissing_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmdepend_t to alpm_depend_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmtrans_t to alpm_trans_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmpkg_t to alpm_pkg_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmdb_t to alpm_db_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmhandle_t to alpm_handle_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmfileconflicttype_t to alpm_fileconflicttype_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmdepmod_t to alpm_depmod_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rename pmpkgreason_t to alpm_pkgreason_tAllan McRae2011-06-28
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | lib/util: modify entry_prefix, not prefixDave Reisner2011-06-30
| | | | | | | | | | | | | | | | | | Modifying prefix caused tmp directories to be left behind after running scriptlets, and the path '/' to be passed to _alpm_rmrf. Broken in f01c6f. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | lib/alpm: unlock the handle before freeing itDave Reisner2011-06-30
|/ | | | | | | | | | This avoids, probably among other things, leaving the lock file in place after a SIGINT'd sync DB update. Fixes regression introduced in 4f8ae2b. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove setter for DB signature levelDan McGee2011-06-27
| | | | | | | This should have been removed with commit db3b86e7f34f but was erroniously left behind. Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix several -Wshadow warningsDan McGee2011-06-27
| | | | | | | | | | Only one of these looked like a real red flag, in find_requiredby(), but it doesn't hurt to fix several of them up anyway. Unfortunately, we can't turn this on universally due to things like the sync(), remove(), etc. builtins which we often use as variable names. Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2011-06-27
|\ | | | | | | | | Conflicts: lib/libalpm/conflict.c
| * Ensure a file can be replaced by a directoryDan McGee2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | This addresses FS#24904. In a normal upgrade case, this replacement seems to work just fine. However, when doing a sync "replace" type upgrade, we weren't properly handling this edge case due to path comparison not ignoring trailing slashes. Fix this by pruning any trailing slashes past a certain point of file conflict resolution where we no longer need them, which allows us to safely detect cases such as now tested in the new pactest. Signed-off-by: Dan McGee <dan@archlinux.org>
| * File conflict code cleanupsDan McGee2011-06-27
| | | | | | | | | | | | | | | | While researching the root cause of FS#24904, I couldn't help but clean up some of the cruft in here. A few whitespace/line-wrapping issues, but also fix shadowed variables and add some const where applicable. Signed-off-by: Dan McGee <dan@archlinux.org>