Blame SOURCES/augeas-1.1.0-yum-equals-space.patch

c537d4
From 897c3c97b6d70bc739eb58cee2c5430c9619ce56 Mon Sep 17 00:00:00 2001
c537d4
From: Dominic Cleal <dcleal@redhat.com>
c537d4
Date: Sat, 9 Nov 2013 12:33:00 +0000
c537d4
Subject: [PATCH 4/5] Yum: permit spaces after equals sign in list options
c537d4
c537d4
Fixes GitHub issue #45
c537d4
c537d4
(cherry picked from commit deb73b5f284db09e3c63f2d7698ab140e2337a3d)
c537d4
---
c537d4
 lenses/tests/test_yum.aug | 10 ++++++++++
c537d4
 lenses/yum.aug            |  2 +-
c537d4
 2 files changed, 11 insertions(+), 1 deletion(-)
c537d4
c537d4
diff --git a/lenses/tests/test_yum.aug b/lenses/tests/test_yum.aug
c537d4
index 660a46c..17d4ea2 100644
c537d4
--- a/lenses/tests/test_yum.aug
c537d4
+++ b/lenses/tests/test_yum.aug
c537d4
@@ -201,6 +201,16 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
c537d4
       Check that we can parse an empty line, to fix test-save *)
c537d4
   test Yum.lns get "\n" = { }
c537d4
 
c537d4
+  (* Test: Yum.lns
c537d4
+       Issue #45: allow spaces around equals sign *)
c537d4
+  test Yum.lns get "[rpmforge]
c537d4
+name = RHEL $releasever - RPMforge.net - dag
c537d4
+baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge\n" =
c537d4
+    { "rpmforge"
c537d4
+      { "name" = "RHEL $releasever - RPMforge.net - dag" }
c537d4
+      { "baseurl" = "http://apt.sw.be/redhat/el6/en/$basearch/rpmforge" }
c537d4
+    }
c537d4
+
c537d4
 (* Local Variables: *)
c537d4
 (* mode: caml       *)
c537d4
 (* End:             *)
c537d4
diff --git a/lenses/yum.aug b/lenses/yum.aug
c537d4
index 585695f..1b13833 100644
c537d4
--- a/lenses/yum.aug
c537d4
+++ b/lenses/yum.aug
c537d4
@@ -19,7 +19,7 @@ let eol      = IniFile.eol
c537d4
 let list_entry (list_key:string)  =
c537d4
   let list_value = store /[^# \t\r\n,][^ \t\r\n,]*[^# \t\r\n,]|[^# \t\r\n,]/ in
c537d4
   let list_sep = del /([ \t]*(,[ \t]*|\r?\n[ \t]+))|[ \t]+/ "\n\t" in
c537d4
-  [ key list_key . sep . list_value ]
c537d4
+  [ key list_key . sep . Sep.opt_space . list_value ]
c537d4
   . (list_sep . Build.opt_list [ label list_key . list_value ] list_sep)?
c537d4
   . eol
c537d4
 
c537d4
-- 
c537d4
1.8.5.3
c537d4