mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 20:05:07 -05:00
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 <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
48f4efd9a1
commit
ae97082e98
@ -597,6 +597,8 @@ int SYMEXPORT alpm_option_add_assumeinstalled(alpm_handle_t *handle, const alpm_
|
|||||||
RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1));
|
RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1));
|
||||||
ASSERT((depcpy = _alpm_dep_dup(dep)), RET_ERR(handle, ALPM_ERR_MEMORY, -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);
|
handle->assumeinstalled = alpm_list_add(handle->assumeinstalled, depcpy);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user