1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
pacman/lib/libalpm
Chantry Xavier f43805d875 Cleanup usages of alpm_list_find and alpm_list_remove.
* remove obsolete and unused *_cmp helper functions like deppkg_cmp and
_alpm_grp_cmp

* new alpm_list_remove_str function, used 6 times in handle.c

* remove _alpm_prov_cmp / _alpm_db_whatprovides and replace them by
a more general alpm_find_pkg_satisfiers with a cleaner implementation.
before: alpm_db_whatprovides(db, targ)
after: alpm_find_pkg_satisfiers(alpm_db_getpkgcache(db), targ)

* remove satisfycmp and replace alpm_list_find + satisfycmp usage by
_alpm_find_dep_satisfiers.
before : alpm_list_find(_alpm_db_get_pkgcache(db), dep, satisfycmp)
after : _alpm_find_dep_satisfiers(_alpm_db_get_pkgcache(db), dep)

* remove _alpm_pkgname_pkg_cmp, which was used with alpm_list_remove, and
use _alpm_pkg_find + alpm_list_remove with _alpm_pkg_cmp instead.

This commit actually get rids of all complicated and asymmetric _cmp
functions. I first thought these functions were worth it, be caused it
allowed us to reuse list_find and list_remove. But this was at the detriment
of the clarity and also the ease of use of these functions, dangerous
because of their asymmetricity.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-13 15:49:02 -05:00
..
po Merge branch 'maint' 2008-03-09 12:03:54 -05:00
.gitignore Remove unnecessary entries from .gitignore files 2007-07-16 16:49:28 -04:00
add.c Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
add.h Update GNU GPL boilerplate and copyright dates 2007-12-10 22:55:39 -06:00
alpm_list.c Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
alpm_list.h Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
alpm.c Remove unnecessary header file, move one macro to util.c 2008-04-06 20:20:20 -05:00
alpm.h Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
backup.c memleak fix: ensure backup fname isn't lost if unused 2008-03-23 16:55:52 -05:00
backup.h Update GNU GPL boilerplate and copyright dates 2007-12-10 22:55:39 -06:00
be_files.c Remove some useless abstraction and start db cleanup 2008-05-11 20:05:59 -05:00
be_package.c Remove errant include of error.h 2008-05-13 15:49:02 -05:00
cache.c Swap the parameters of alpm_pkg_find 2008-05-13 15:49:02 -05:00
cache.h Update GNU GPL boilerplate and copyright dates 2007-12-10 22:55:39 -06:00
conflict.c Remove unnecessary header file, move one macro to util.c 2008-04-06 20:20:20 -05:00
conflict.h New _alpm_conflict_dup function 2008-01-27 11:54:25 -06:00
db.c Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
db.h Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
delta.c Completely rework delta algorithm 2008-04-26 11:36:01 -05:00
delta.h Completely rework delta algorithm 2008-04-26 11:36:01 -05:00
deps.c Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
deps.h Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
dload.c Give libalpm native support for both libdownload and libfetch 2008-04-19 16:18:17 -05:00
dload.h Remove unnecessary import in dload.h 2008-04-10 20:53:28 -05:00
error.c Fix some fallout from the delta/download changes 2008-04-26 13:03:53 -05:00
graph.h Completely rework delta algorithm 2008-04-26 11:36:01 -05:00
group.c Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
group.h Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
handle.c Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
handle.h Remove upgradedelay and all code associated with it 2008-01-08 15:49:52 -06:00
log.c Remove unnecessary header file, move one macro to util.c 2008-04-06 20:20:20 -05:00
log.h Update GNU GPL boilerplate and copyright dates 2007-12-10 22:55:39 -06:00
Makefile.am Refactor pkg_load/parse_descfile into a new backend file 2008-05-11 20:07:55 -05:00
md5.c Update md5 routines 2008-05-08 20:59:18 -05:00
md5.h Update md5 routines 2008-05-08 20:59:18 -05:00
package.c Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
package.h Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
remove.c Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
remove.h Update GNU GPL boilerplate and copyright dates 2007-12-10 22:55:39 -06:00
sync.c Cleanup usages of alpm_list_find and alpm_list_remove. 2008-05-13 15:49:02 -05:00
sync.h pmsyncpkg_t cleanup 2008-01-27 12:05:33 -06:00
trans.c Remove unnecessary header file, move one macro to util.c 2008-04-06 20:20:20 -05:00
trans.h Remove trans->targets 2008-03-10 18:57:36 -05:00
util.c Update makepath to remove PATH_MAX usage 2008-05-10 00:51:04 -05:00
util.h Remove unnecessary NULL check in FREE() macro 2008-04-19 15:59:40 -05:00