Blame SOURCES/augeas-1.1.0-iproute2-dsfield-hex.patch

c537d4
From e27a4f34800d8420a01ee3e7d4182c1d48489182 Mon Sep 17 00:00:00 2001
c537d4
From: Dominic Cleal <dcleal@redhat.com>
c537d4
Date: Wed, 12 Feb 2014 09:49:03 +0000
c537d4
Subject: [PATCH 1/2] IPRoute2: handle hex IDs and hyphens in names, as present
c537d4
 in rt_dsfield
c537d4
c537d4
Fixes RHBZ#1063961
c537d4
c537d4
(cherry picked from commit 2686edf4bcc0a2110ef5a2e8c01045ab0081b04e)
c537d4
c537d4
Conflicts:
c537d4
	NEWS
c537d4
---
c537d4
 lenses/iproute2.aug            |  3 ++-
c537d4
 lenses/tests/test_iproute2.aug | 10 ++++++++++
c537d4
 2 files changed, 12 insertions(+), 1 deletion(-)
c537d4
c537d4
diff --git a/lenses/iproute2.aug b/lenses/iproute2.aug
c537d4
index 66b4a2c..6f6b1ba 100644
c537d4
--- a/lenses/iproute2.aug
c537d4
+++ b/lenses/iproute2.aug
c537d4
@@ -2,7 +2,8 @@ module IPRoute2 =
c537d4
   autoload xfm
c537d4
 
c537d4
   let empty   = [ del /[ \t]*#?[ \t]*\n/ "\n" ]
c537d4
-  let record = [ store /[0-9]+/ . del /[ \t]+/ "\t" . key /[a-zA-Z0-9]+/ . Util.comment_or_eol ]
c537d4
+  let id = Rx.hex | Rx.integer
c537d4
+  let record = [ store id . del /[ \t]+/ "\t" . key /[a-zA-Z0-9-]+/ . Util.comment_or_eol ]
c537d4
 
c537d4
   let lns = ( empty | Util.comment | record ) *
c537d4
 
c537d4
diff --git a/lenses/tests/test_iproute2.aug b/lenses/tests/test_iproute2.aug
c537d4
index cbd7802..cc24efe 100644
c537d4
--- a/lenses/tests/test_iproute2.aug
c537d4
+++ b/lenses/tests/test_iproute2.aug
c537d4
@@ -19,6 +19,11 @@ let conf = "
c537d4
 203	adsl3
c537d4
 204	adsl4
c537d4
 205	wifi0
c537d4
+#
c537d4
+# From rt_dsfield
c537d4
+#
c537d4
+0x00  default
c537d4
+0x80  flash-override
c537d4
 "
c537d4
 
c537d4
 test IPRoute2.lns get conf =
c537d4
@@ -41,3 +46,8 @@ test IPRoute2.lns get conf =
c537d4
   { "adsl3" = "203" }
c537d4
   { "adsl4" = "204" }
c537d4
   { "wifi0" = "205" }
c537d4
+  { }
c537d4
+  { "#comment" = "From rt_dsfield" }
c537d4
+  { }
c537d4
+  { "default" = "0x00" }
c537d4
+  { "flash-override" = "0x80" }
c537d4
-- 
c537d4
1.8.5.3
c537d4