summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2011-07-03Do not replicate files list when removing packagesAllan McRae1-9/+3
This saves replicating the potentially large list of files in a package that is being removed. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-03Add alpm_list_previous methodAllan McRae2-0/+19
Helper function to get the previous item in a list Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-03checkdeps: remove unnecessary list join and copyDan McGee1-4/+2
We can just perform the same search operation on both lists. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-03be_local: use macros in database loading similar to be_syncDan McGee1-77/+43
This removes some of the repetition in the code for reading and parsing database file lines. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-03be_sync: make READ_NEXT() a no-arg macroDan McGee1-12/+12
We passed in 'line', but not 'buf.line'. In addition, the macros building off of READ_NEXT() assume variable names anyway. Since we only use these macros in one function, might as well simplify them. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-02Prefix _alpm_errno_t members with ALPMAllan McRae20-265/+265
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-02Prefix alpm_transprog_t members with ALPMAllan McRae6-22/+22
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-02Prefix alpm_transconv_t members with ALPMAllan McRae3-15/+15
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-02Prefix alpm_transevt_t members with ALPMAllan McRae5-54/+54
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-02Prefix alpm_transflag_t members with ALPMAllan McRae6-48/+48
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-02Prefix alpm_loglevel_t members with ALPMAllan McRae18-296/+296
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-02Prefix alpm_fileconflicttype_t members with ALPMAllan McRae2-5/+5
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-02Prefix alpm_depmod_t members with ALPMAllan McRae2-28/+28
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-02Prefix alpm_pkgreason_t members with ALPMAllan McRae4-11/+11
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-30signing: check validity of all available signaturesDan McGee1-28/+29
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>
2011-06-30Make alpm_db_get_sigverify_level() publicDan McGee6-19/+22
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30Add an alpm_db_get_valid() public functionDan McGee5-0/+19
This allows one to check if a database is valid or invalid. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30Make local_db_read() private to the local backendDan McGee5-32/+27
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>
2011-06-30Fix a few warnings pointed out via clang scan-buildDan McGee4-15/+14
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>
2011-06-30Merge remote-tracking branch 'allan/breakshit'Dan McGee44-916/+916
2011-06-30lib/util: modify entry_prefix, not prefixDave Reisner1-1/+1
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>
2011-06-30lib/alpm: unlock the handle before freeing itDave Reisner1-0/+1
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>
2011-06-29Use ignoregroup rather than ignoregrp in the handleAllan McRae3-9/+9
This matches the naming in pacman.conf. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-29Rename internal functions with grp in their nameAllan McRae4-15/+15
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>
2011-06-29Rename public functions with grp in their nameAllan McRae5-19/+19
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>
2011-06-28Rename _pmdbstatus_t to _alpm_dbstatus_tAllan McRae1-2/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmdbinfrq_t to alpm_dbinfrq_tAllan McRae3-8/+8
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmtransstate_t to alpm_transstate_tAllan McRae1-3/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmpkghash_t to alpm_pkghash_tAllan McRae4-26/+26
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmgraph_t to alpm_graph_tAllan McRae4-24/+24
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmpkgfrom_t to alpm_pkgfrom_tAllan McRae1-3/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmerrno_t to alpm_errno_tAllan McRae5-11/+11
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmtransprog_t to alpm_transprog_tAllan McRae1-3/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmtransconv_t to alpm_transconv_tAllan McRae1-3/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmtransevt_t to alpm_transevt_tAllan McRae1-3/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmtransflag_t to alpm_transflag_tAllan McRae3-8/+8
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmloglevel_t to alpm_loglevel_tAllan McRae3-5/+5
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmbackup_t to alpm_backup_tAllan McRae7-23/+23
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmdelta_t to alpm_delta_tAllan McRae4-28/+28
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmgrp_t to alpm_group_tAllan McRae6-15/+15
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmfileconflict_t to alpm_fileconflict_tAllan McRae3-7/+7
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmconflict_t to alpm_conflict_tAllan McRae4-19/+19
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmdepmissing_t to alpm_depmissing_tAllan McRae4-15/+15
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmdepend_t to alpm_depend_tAllan McRae7-36/+36
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmtrans_t to alpm_trans_tAllan McRae9-28/+28
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmpkg_t to alpm_pkg_tAllan McRae24-330/+330
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmdb_t to alpm_db_tAllan McRae20-127/+127
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmhandle_t to alpm_handle_tAllan McRae36-237/+237
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmfileconflicttype_t to alpm_fileconflicttype_tAllan McRae2-4/+4
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmdepmod_t to alpm_depmod_tAllan McRae2-4/+4
Signed-off-by: Allan McRae <allan@archlinux.org>