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

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