From 902305f1633298ff0ef7cd2bfbed0e91aae91646 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 30 Oct 2011 13:33:14 -0400 Subject: add support for back end fnmatch'd options This is work originally provided by Sascha Kruse on FS#20360 with only minor adjustments to the implementation. It's been expanded to cover: NoUpgrade, NoExtract, IgnorePkg, IgnoreGroup. Adds tests ignore008, sync139, sync502, and sync503. Also satisfies FS#18988. Original-work-by: Sascha Kruse Signed-off-by: Dave Reisner --- lib/libalpm/remove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/remove.c') diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index cf137ae8..d7e06bc8 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -216,7 +216,7 @@ static int can_remove_file(alpm_handle_t *handle, const alpm_file_t *file, { char filepath[PATH_MAX]; - if(alpm_list_find_str(skip_remove, file->name)) { + if(alpm_list_find(skip_remove, file->name, _alpm_fnmatch)) { /* return success because we will never actually remove this file */ return 1; } @@ -251,7 +251,7 @@ static int unlink_file(alpm_handle_t *handle, alpm_pkg_t *oldpkg, /* check the remove skip list before removing the file. * see the big comment block in db_find_fileconflicts() for an * explanation. */ - if(alpm_list_find_str(skip_remove, fileobj->name)) { + if(alpm_list_find(skip_remove, fileobj->name, _alpm_fnmatch)) { _alpm_log(handle, ALPM_LOG_DEBUG, "%s is in skip_remove, skipping removal\n", file); return 1; -- cgit v1.2.3-24-g4f1b