diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-09 22:18:47 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-14 15:38:51 +0200 |
commit | 0074cadb3bfdf5d89065e69eb93788ebcc9a6b58 (patch) | |
tree | 655fa20633729478be72bb9692101d7fe0e175a0 /lib/libalpm/package.c | |
parent | c206b3a6d503e57691664b94e68ba85760bd0b6c (diff) | |
download | pacman-0074cadb3bfdf5d89065e69eb93788ebcc9a6b58.tar.gz pacman-0074cadb3bfdf5d89065e69eb93788ebcc9a6b58.tar.xz |
Add handle argument to _alpm_pkg_should_ignore()
This allows callers to retrieve it from wherever is convenient, which
may or may not be on the package object itself.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r-- | lib/libalpm/package.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 969458ac..61194e91 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -534,21 +534,22 @@ pmpkg_t *_alpm_pkg_find(alpm_list_t *haystack, const char *needle) * Checks if the package is ignored via IgnorePkg, or if the package is * in a group ignored via IgnoreGrp. * + * @param handle the context handle * @param pkg the package to test * * @return 1 if the package should be ignored, 0 otherwise */ -int _alpm_pkg_should_ignore(pmpkg_t *pkg) +int _alpm_pkg_should_ignore(pmhandle_t *handle, pmpkg_t *pkg) { alpm_list_t *groups = NULL; /* first see if the package is ignored */ - if(alpm_list_find_str(pkg->handle->ignorepkg, alpm_pkg_get_name(pkg))) { + if(alpm_list_find_str(handle->ignorepkg, alpm_pkg_get_name(pkg))) { return 1; } /* next see if the package is in a group that is ignored */ - for(groups = pkg->handle->ignoregrp; groups; groups = alpm_list_next(groups)) { + for(groups = handle->ignoregrp; groups; groups = alpm_list_next(groups)) { char *grp = (char *)alpm_list_getdata(groups); if(alpm_list_find_str(alpm_pkg_get_groups(pkg), grp)) { return 1; |