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

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