summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/deps.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-15 16:12:18 +0100
committerDan McGee <dan@archlinux.org>2011-11-15 16:12:18 +0100
commit9363e7dc22f85c549cd90768ce884508901820a8 (patch)
treebffb670dd739c4589555cf351e9578f873ad842d /lib/libalpm/deps.c
parent37ff0f5658e356a4fbd9ad212ccab2acb0d9bb46 (diff)
downloadpacman-9363e7dc22f85c549cd90768ce884508901820a8.tar.gz
pacman-9363e7dc22f85c549cd90768ce884508901820a8.tar.xz
Allow sync_prepare to work in certain cases without sync databases
When doing a bare -U operation on a local package that doesn't pull in any dependencies from the sync databases, we can get away with missing database files. This makes the check conditional on no sync targets found in the target list. This is not the prettiest code here so we have a bit of hackish behavior required to straighten both the behavior and the nonsensical error message out. Addresses FS#26899. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/deps.c')
-rw-r--r--lib/libalpm/deps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 60401583..89f6d691 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -631,7 +631,7 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
/* first check if one provider is already installed locally */
for(i = providers; i; i = i->next) {
alpm_pkg_t *pkg = i->data;
- if(_alpm_pkghash_find(_alpm_db_get_pkgcache_hash(handle->db_local), pkg->name)) {
+ if(_alpm_db_get_pkgfromcache(handle->db_local, pkg->name)) {
alpm_list_free(providers);
return pkg;
}