063c33
From af7dd8c3583a5337c1735d9c8fbfd2f859b292ac Mon Sep 17 00:00:00 2001
063c33
From: Matej Habrnal <mhabrnal@redhat.com>
063c33
Date: Fri, 1 Apr 2016 13:11:46 +0200
063c33
Subject: [PATCH] augeas: trim spaces before key value
063c33
063c33
Resolves: rhbz#1236613
063c33
063c33
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
063c33
---
063c33
 augeas/libreport.aug      | 2 +-
063c33
 augeas/test_libreport.aug | 8 ++++++++
063c33
 2 files changed, 9 insertions(+), 1 deletion(-)
063c33
063c33
diff --git a/augeas/libreport.aug b/augeas/libreport.aug
063c33
index 242d2c7..483eeaf 100644
063c33
--- a/augeas/libreport.aug
063c33
+++ b/augeas/libreport.aug
063c33
@@ -14,7 +14,7 @@ module Libreport =
063c33
     let empty = [ del /[ \t]*\n/ "\n" ]
063c33
 
063c33
     (* Define option *)
063c33
-    let option = [ key ident . value_sep . value_to_eol . eol ]
063c33
+    let option = [ del /[ \t]*/ "" . key ident . value_sep . value_to_eol . eol ]
063c33
 
063c33
     (* Define lens *)
063c33
     let lns = ( comment | empty | option )*
063c33
diff --git a/augeas/test_libreport.aug b/augeas/test_libreport.aug
063c33
index b6d319e..116e97c 100644
063c33
--- a/augeas/test_libreport.aug
063c33
+++ b/augeas/test_libreport.aug
063c33
@@ -21,6 +21,10 @@ DontMatchComponents = selinux-policy
063c33
 # for more info about these settings see: https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets
063c33
 CreatePrivate= no
063c33
 PrivateGroups=private
063c33
+ Whitespace = start
063c33
+  Whitespace_two=start
063c33
+	Whitespace_three =start
063c33
+	 Whitespace_four= start
063c33
 "
063c33
 
063c33
     test Libreport.lns get conf =
063c33
@@ -45,3 +49,7 @@ PrivateGroups=private
063c33
         { "#comment" = "for more info about these settings see: https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets" }
063c33
         { "CreatePrivate" = "no" }
063c33
         { "PrivateGroups" = "private" }
063c33
+        { "Whitespace" = "start" }
063c33
+        { "Whitespace_two" = "start" }
063c33
+        { "Whitespace_three" = "start" }
063c33
+        { "Whitespace_four" = "start" }
063c33
-- 
063c33
2.5.5
063c33