index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2016-02-21 21:46:35 -0500 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2016-02-23 12:15:43 +1000 |
commit | 2ee7a8d89ad693617307260604e1d58757fd2978 (patch) | |
tree | 4168d3e07cd4a8ebe21180ac8bc0e27fb05821dd /lib/libalpm/hook.c | |
parent | f63854fa96f658ca5bdf2c21a1cd33cf4e3fbdbd (diff) |
-rw-r--r-- | lib/libalpm/hook.c | 4 |
diff --git a/lib/libalpm/hook.c b/lib/libalpm/hook.c index 81c347e1..6890a6ec 100644 --- a/lib/libalpm/hook.c +++ b/lib/libalpm/hook.c @@ -374,7 +374,7 @@ static int _alpm_hook_trigger_match_file(alpm_handle_t *handle, /* check if file will be removed due to package upgrade */ for(i = handle->trans->add; i; i = i->next) { alpm_pkg_t *spkg = i->data; - alpm_pkg_t *pkg = alpm_db_get_pkg(handle->db_local, spkg->name); + alpm_pkg_t *pkg = spkg->oldpkg; if(pkg) { alpm_filelist_t filelist = pkg->files; size_t f; @@ -463,7 +463,7 @@ static int _alpm_hook_trigger_match_pkg(alpm_handle_t *handle, for(i = handle->trans->add; i; i = i->next) { alpm_pkg_t *pkg = i->data; if(_alpm_fnmatch_patterns(t->targets, pkg->name) == 0) { - if(alpm_db_get_pkg(handle->db_local, pkg->name)) { + if(pkg->oldpkg) { if(t->op & ALPM_HOOK_OP_UPGRADE) { if(hook->needs_targets) { upgrade = alpm_list_add(upgrade, pkg->name); |