1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Add alpm_option_match_noextract

This is useful for frontends testing whether a file is in NoExtract

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2014-11-18 12:31:30 +10:00
parent 5d11605958
commit 96e9cf35f1
2 changed files with 6 additions and 0 deletions

View File

@ -827,6 +827,7 @@ alpm_list_t *alpm_option_get_noextracts(alpm_handle_t *handle);
int alpm_option_add_noextract(alpm_handle_t *handle, const char *path);
int alpm_option_set_noextracts(alpm_handle_t *handle, alpm_list_t *noextract);
int alpm_option_remove_noextract(alpm_handle_t *handle, const char *path);
int alpm_option_match_noextract(alpm_handle_t *handle, const char *path);
/** @} */
/** @name Accessors to the list of ignored packages.

View File

@ -542,6 +542,11 @@ int SYMEXPORT alpm_option_remove_noextract(alpm_handle_t *handle, const char *pa
return _alpm_option_strlist_rem(handle, &(handle->noextract), path);
}
int SYMEXPORT alpm_option_match_noextract(alpm_handle_t *handle, const char *path)
{
return _alpm_fnmatch_patterns(handle->noextract, path);
}
int SYMEXPORT alpm_option_add_ignorepkg(alpm_handle_t *handle, const char *pkg)
{
return _alpm_option_strlist_add(handle, &(handle->ignorepkg), pkg);