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

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