Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2019-06-03 00:32:36 -0700
committerAllan McRae <allan@archlinux.org>2019-06-06 10:38:31 +1000
commit39c20ad4f1d5f6e915b5be8976b6a94885ca3b0c (patch)
tree74d38438facb45679fda9e22711186c3abac67bb /lib
parent55a65aaf904a32bcf59c652cbc03fc510c265142 (diff)
hooks: rename type File to Path
Make it clearer that the targets are matched against both directories and regular files and free up File to potentially refer specifically to regular files in the future. File is retained as a deprecated alias for Path for the time being to avoid breaking existing hooks and will be removed in a future release. See FS#53136. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/hook.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libalpm/hook.c b/lib/libalpm/hook.c
index d90ed2da..6143ea0f 100644
--- a/lib/libalpm/hook.c
+++ b/lib/libalpm/hook.c
@@ -38,7 +38,7 @@ enum _alpm_hook_op_t {
enum _alpm_trigger_type_t {
ALPM_HOOK_TYPE_PACKAGE = 1,
- ALPM_HOOK_TYPE_FILE,
+ ALPM_HOOK_TYPE_PATH,
};
struct _alpm_trigger_t {
@@ -303,7 +303,11 @@ static int _alpm_hook_parse_cb(const char *file, int line,
if(strcmp(value, "Package") == 0) {
t->type = ALPM_HOOK_TYPE_PACKAGE;
} else if(strcmp(value, "File") == 0) {
- t->type = ALPM_HOOK_TYPE_FILE;
+ _alpm_log(handle, ALPM_LOG_DEBUG,
+ "File targets are deprecated, use Path instead\n");
+ t->type = ALPM_HOOK_TYPE_PATH;
+ } else if(strcmp(value, "Path") == 0) {
+ t->type = ALPM_HOOK_TYPE_PATH;
} else {
error(_("hook %s line %d: invalid value %s\n"), file, line, value);
}