Blame SOURCES/0050-mlcustomize-Trim-whitespaces-from-commands-read-from.patch

da373f
From 931846b8f08e5e763141cadfc5e9b194b69303e3 Mon Sep 17 00:00:00 2001
3efd08
From: Martin Kletzander <mkletzan@redhat.com>
3efd08
Date: Mon, 24 Feb 2020 13:12:03 +0100
3efd08
Subject: [PATCH] mlcustomize: Trim whitespaces from commands read from file
3efd08
 (RHBZ#1351000)
3efd08
3efd08
The first split does not care about the whole string, it is just trying to get
3efd08
the command name in front, so triml is just right.
3efd08
3efd08
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
3efd08
---
3efd08
 generator/customize.ml | 1 +
3efd08
 1 file changed, 1 insertion(+)
3efd08
3efd08
diff --git a/generator/customize.ml b/generator/customize.ml
3efd08
index c278347c1..0b256e2d2 100644
3efd08
--- a/generator/customize.ml
3efd08
+++ b/generator/customize.ml
3efd08
@@ -873,6 +873,7 @@ let rec argspec () =
3efd08
 pr "    ] in
3efd08
     let lines = read_whole_file filename in
3efd08
     let lines = String.lines_split lines in
3efd08
+    let lines = List.map String.triml lines in
3efd08
     let lines = List.filter (
3efd08
       fun line ->
3efd08
         String.length line > 0 && line.[0] <> '#'
3efd08
-- 
da373f
2.18.4
3efd08