[pacman-dev] [PATCH] add alpm_option_match_noupgrade
For parity with alpm_option_match_noextract. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> --- lib/libalpm/alpm.h | 1 + lib/libalpm/handle.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 234bd6b..e6ef3ae 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -815,6 +815,7 @@ alpm_list_t *alpm_option_get_noupgrades(alpm_handle_t *handle); int alpm_option_add_noupgrade(alpm_handle_t *handle, const char *path); int alpm_option_set_noupgrades(alpm_handle_t *handle, alpm_list_t *noupgrade); int alpm_option_remove_noupgrade(alpm_handle_t *handle, const char *path); +int alpm_option_match_noupgrade(alpm_handle_t *handle, const char *path); /** @} */ /** @name Accessors to the list of no-extract files. diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 5ef619e..fa99948 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -527,6 +527,11 @@ int SYMEXPORT alpm_option_remove_noupgrade(alpm_handle_t *handle, const char *pk return _alpm_option_strlist_rem(handle, &(handle->noupgrade), pkg); } +int SYMEXPORT alpm_option_match_noupgrade(alpm_handle_t *handle, const char *path) +{ + return _alpm_fnmatch_patterns(handle->noupgrade, path); +} + int SYMEXPORT alpm_option_add_noextract(alpm_handle_t *handle, const char *path) { return _alpm_option_strlist_add(handle, &(handle->noextract), path); -- 2.1.3
participants (1)
-
Andrew Gregory