|
|
106d92 |
From a12ebfad6b808a85a70bb245a64f56724fc7a4c4 Mon Sep 17 00:00:00 2001
|
|
|
106d92 |
From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek@redhat.com>
|
|
|
106d92 |
Date: Mon, 30 Oct 2017 12:43:19 -0500
|
|
|
106d92 |
Subject: [PATCH] INI: Silence ini_augment match failures
|
|
|
106d92 |
MIME-Version: 1.0
|
|
|
106d92 |
Content-Type: text/plain; charset=UTF-8
|
|
|
106d92 |
Content-Transfer-Encoding: 8bit
|
|
|
106d92 |
|
|
|
106d92 |
Resolves:
|
|
|
106d92 |
https://pagure.io/SSSD/ding-libs/issue/3182
|
|
|
106d92 |
|
|
|
106d92 |
Reviewed-by: Michal Židek <mzidek@redhat.com>
|
|
|
106d92 |
Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
|
|
|
106d92 |
Merges: https://pagure.io/SSSD/ding-libs/pull-request/3183
|
|
|
106d92 |
(cherry picked from commit be9ca3a2c26b061d1f22bd4a09009bba7a01f67b)
|
|
|
106d92 |
|
|
|
106d92 |
DOWNSTREAM:
|
|
|
106d92 |
Resolves: rhbz#1507607 - ding-libs: libini_config: `ini_config_augment` reports errors on match failure
|
|
|
106d92 |
---
|
|
|
106d92 |
ini/ini.d/merge.validator | 11 -----------
|
|
|
106d92 |
ini/ini_augment.c | 13 +++++++------
|
|
|
106d92 |
2 files changed, 7 insertions(+), 17 deletions(-)
|
|
|
106d92 |
|
|
|
106d92 |
diff --git a/ini/ini.d/merge.validator b/ini/ini.d/merge.validator
|
|
|
106d92 |
index 1defe8e78e598d903fa6b8c35a015076d5e5e43e..017c1cb8fb441fbe854d57ea9ea9f8476595d6bd 100644
|
|
|
106d92 |
--- a/ini/ini.d/merge.validator
|
|
|
106d92 |
+++ b/ini/ini.d/merge.validator
|
|
|
106d92 |
@@ -1,17 +1,8 @@
|
|
|
106d92 |
-File %s%s/merge.validator did not match provided patterns. Skipping.
|
|
|
106d92 |
-File %s%s/real8.conf did not match provided patterns. Skipping.
|
|
|
106d92 |
-File %s%s/new_line.conf did not match provided patterns. Skipping.
|
|
|
106d92 |
-File %s%s/real32be.conf did not match provided patterns. Skipping.
|
|
|
106d92 |
-File %s%s/real32le.conf did not match provided patterns. Skipping.
|
|
|
106d92 |
-File %s%s/real16be.conf did not match provided patterns. Skipping.
|
|
|
106d92 |
-File %s%s/real16le.conf did not match provided patterns. Skipping.
|
|
|
106d92 |
-File %s%s/foo.conf.in did not match provided patterns. Skipping.
|
|
|
106d92 |
Errors detected while parsing: %s%s/comment.conf.
|
|
|
106d92 |
Error (9) on line 22: Invalid space character at the beginning of the line.
|
|
|
106d92 |
Error (9) on line 24: Invalid space character at the beginning of the line.
|
|
|
106d92 |
Error (9) on line 26: Invalid space character at the beginning of the line.
|
|
|
106d92 |
Error (15) on line 32: Incomplete comment at the end of the file.
|
|
|
106d92 |
-No sections found in file %s%s/comment.conf. Skipping.
|
|
|
106d92 |
Section [section_a] found in file %s%s/first.conf is not allowed.
|
|
|
106d92 |
Section [section_c] found in file %s%s/first.conf is not allowed.
|
|
|
106d92 |
Section [section_b] found in file %s%s/first.conf is not allowed.
|
|
|
106d92 |
@@ -42,7 +33,6 @@ Error (9) on line 1: Invalid space character at the beginning of the line.
|
|
|
106d92 |
Error (9) on line 2: Invalid space character at the beginning of the line.
|
|
|
106d92 |
Error (9) on line 3: Invalid space character at the beginning of the line.
|
|
|
106d92 |
Error (9) on line 4: Invalid space character at the beginning of the line.
|
|
|
106d92 |
-No sections found in file %s%s/space.conf. Skipping.
|
|
|
106d92 |
Section [info] found in file %s%s/symbols.conf is not allowed.
|
|
|
106d92 |
Section [languages] found in file %s%s/symbols.conf is not allowed.
|
|
|
106d92 |
Section [text] found in file %s%s/symbols.conf is not allowed.
|
|
|
106d92 |
@@ -55,6 +45,5 @@ Error (9) on line 15: Invalid space character at the beginning of the line.
|
|
|
106d92 |
Error (9) on line 16: Invalid space character at the beginning of the line.
|
|
|
106d92 |
Error (9) on line 26: Invalid space character at the beginning of the line.
|
|
|
106d92 |
Error (9) on line 35: Invalid space character at the beginning of the line.
|
|
|
106d92 |
-No sections found in file %s%s/test.conf. Skipping.
|
|
|
106d92 |
%s%s/ipa.conf
|
|
|
106d92 |
%s%s/real.conf
|
|
|
106d92 |
diff --git a/ini/ini_augment.c b/ini/ini_augment.c
|
|
|
106d92 |
index af5c0b6959334d8072b4979ff568ffb1e2756d83..9d83ad9f09caa2d3d21fdeb7d93c57be27d43947 100644
|
|
|
106d92 |
--- a/ini/ini_augment.c
|
|
|
106d92 |
+++ b/ini/ini_augment.c
|
|
|
106d92 |
@@ -32,6 +32,8 @@
|
|
|
106d92 |
#include <sys/types.h>
|
|
|
106d92 |
#include <regex.h>
|
|
|
106d92 |
#include <unistd.h>
|
|
|
106d92 |
+#define TRACE_LEVEL 7
|
|
|
106d92 |
+#define TRACE_HOME
|
|
|
106d92 |
#include "trace.h"
|
|
|
106d92 |
#include "collection.h"
|
|
|
106d92 |
#include "collection_tools.h"
|
|
|
106d92 |
@@ -456,10 +458,9 @@ static int ini_aug_construct_list(char *dirname ,
|
|
|
106d92 |
}
|
|
|
106d92 |
}
|
|
|
106d92 |
else {
|
|
|
106d92 |
- ini_aug_add_string(ra_err,
|
|
|
106d92 |
- "File %s did not match provided patterns."
|
|
|
106d92 |
- " Skipping.",
|
|
|
106d92 |
- fullname);
|
|
|
106d92 |
+ TRACE_INFO_STRING("File did not match provided patterns."
|
|
|
106d92 |
+ " Skipping:",
|
|
|
106d92 |
+ fullname);
|
|
|
106d92 |
}
|
|
|
106d92 |
}
|
|
|
106d92 |
|
|
|
106d92 |
@@ -609,8 +610,8 @@ static int ini_aug_match_sec(struct ini_cfgobj *snip_cfg,
|
|
|
106d92 |
|
|
|
106d92 |
/* Just in case check that we processed anything */
|
|
|
106d92 |
if (section_count == 0) {
|
|
|
106d92 |
- ini_aug_add_string(ra_err, "No sections found in file %s. Skipping.",
|
|
|
106d92 |
- snip_name);
|
|
|
106d92 |
+ TRACE_INFO_STRING("No sections found in file. Skipping:",
|
|
|
106d92 |
+ snip_name);
|
|
|
106d92 |
*skip = true;
|
|
|
106d92 |
TRACE_FLOW_EXIT();
|
|
|
106d92 |
return EOK;
|
|
|
106d92 |
--
|
|
|
106d92 |
2.9.5
|
|
|
106d92 |
|