Blame SOURCES/INI-Silence-ini_augment-match-failures.patch

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