[DHG_packages] 01/10: debian: Preserve newlines at the beginning of fields.

Joachim Breitner nomeata at moszumanska.debian.org
Wed Aug 12 18:20:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch master
in repository DHG_packages.

commit 026efa8f38cbf407a37f9a39c5adcf8fa74d6dc6
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Aug 12 17:15:00 2015 +0200

    debian: Preserve newlines at the beginning of fields.
---
 p/haskell-debian/debian/changelog                 |  7 +++++
 p/haskell-debian/debian/patches/preserve-newlines | 33 +++++++++++++++++++++++
 p/haskell-debian/debian/patches/series            |  1 +
 3 files changed, 41 insertions(+)

diff --git a/p/haskell-debian/debian/changelog b/p/haskell-debian/debian/changelog
index 3d9de02..0702442 100644
--- a/p/haskell-debian/debian/changelog
+++ b/p/haskell-debian/debian/changelog
@@ -1,3 +1,10 @@
+haskell-debian (3.87.2-2) unstable; urgency=medium
+
+  * debian/patches/preserve-newlines: Preserve newlines at the beginning of
+    fields.
+
+ -- Joachim Breitner <nomeata at debian.org>  Wed, 12 Aug 2015 17:15:02 +0200
+
 haskell-debian (3.87.2-1) unstable; urgency=medium
 
   * New upstream release
diff --git a/p/haskell-debian/debian/patches/preserve-newlines b/p/haskell-debian/debian/patches/preserve-newlines
new file mode 100644
index 0000000..96a52b0
--- /dev/null
+++ b/p/haskell-debian/debian/patches/preserve-newlines
@@ -0,0 +1,33 @@
+commit 26cc6a56bd4a7d8b31673f1ee47198a2949b3af3
+Author: Joachim Breitner <mail at joachim-breitner.de>
+Date:   Wed Aug 12 11:43:34 2015 +0200
+
+    Do not use T.strip
+    
+    as it strips newlines, which are significant (otherwise round-tripping a
+    Comment field starting in the second line is broken). Use T.dropAround
+    instead.
+
+Index: haskell-debian/Debian/Control/Text.hs
+===================================================================
+--- haskell-debian.orig/Debian/Control/Text.hs	2015-08-12 17:13:45.922235347 +0200
++++ haskell-debian/Debian/Control/Text.hs	2015-08-12 17:14:06.478389653 +0200
+@@ -29,7 +29,7 @@
+ import qualified Data.ByteString.Char8 as B
+ import Data.Char (toLower, chr)
+ import Data.List (find)
+-import qualified Data.Text as T (Text, pack, unpack, map, strip, reverse)
++import qualified Data.Text as T (Text, pack, unpack, map, dropAround, reverse)
+ import Data.Text.Encoding (decodeUtf8With, encodeUtf8)
+ --import Data.Text.IO as T (readFile)
+ import qualified Debian.Control.ByteString as B
+@@ -92,7 +92,8 @@
+         where hasFieldName :: String -> Field' T.Text -> Bool
+               hasFieldName name (Field (fieldName',_)) = T.pack name == T.map toLower fieldName'
+               hasFieldName _ _ = False
+-    stripWS = T.reverse . T.strip . T.reverse . T.strip
++    stripWS = T.dropAround (`elem` " \t")
++      -- T.strip would also strip newlines
+     protectFieldText = protectFieldText'
+     asString = T.unpack
+ 
diff --git a/p/haskell-debian/debian/patches/series b/p/haskell-debian/debian/patches/series
new file mode 100644
index 0000000..3ac8fc2
--- /dev/null
+++ b/p/haskell-debian/debian/patches/series
@@ -0,0 +1 @@
+preserve-newlines

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git



More information about the Pkg-haskell-commits mailing list