From ae97082e98b6c3984799ba9f3f6ccc6ef5da6034 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Thu, 16 Jul 2015 19:05:34 -0400 Subject: fill in name_hash for assumeinstalled options alpm_depend_t is an exposed data type. Front-ends may opt for alloc'ing one and filling the fields manually, but alpm's _alpm_hash_sdbm is not exposed, making it impossible for them to fill in the name_hash field. Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- lib/libalpm/handle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index f336bf2b..a12ac50d 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -597,6 +597,8 @@ int SYMEXPORT alpm_option_add_assumeinstalled(alpm_handle_t *handle, const alpm_ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1)); ASSERT((depcpy = _alpm_dep_dup(dep)), RET_ERR(handle, ALPM_ERR_MEMORY, -1)); + /* fill in name_hash in case dep was built by hand */ + depcpy->name_hash = _alpm_hash_sdbm(dep->name); handle->assumeinstalled = alpm_list_add(handle->assumeinstalled, depcpy); return 0; } -- cgit v1.2.3-70-g09d2