diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2015-08-12 17:15:00 +0200 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2015-08-12 17:27:19 +0200 |
commit | 026efa8f38cbf407a37f9a39c5adcf8fa74d6dc6 (patch) | |
tree | f4c72cbdb8c3351a06968bcb43258d8e6024ef82 | |
parent | a9c80ca57ee0b5f4838261571939143528c7f804 (diff) | |
download | DHG_packages-026efa8f38cbf407a37f9a39c5adcf8fa74d6dc6.tar.gz |
debian: Preserve newlines at the beginning of fields.
-rw-r--r-- | p/haskell-debian/debian/changelog | 7 | ||||
-rw-r--r-- | p/haskell-debian/debian/patches/preserve-newlines | 33 | ||||
-rw-r--r-- | p/haskell-debian/debian/patches/series | 1 |
3 files changed, 41 insertions, 0 deletions
diff --git a/p/haskell-debian/debian/changelog b/p/haskell-debian/debian/changelog index 3d9de02db..070244268 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@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 000000000..96a52b0e6 --- /dev/null +++ b/p/haskell-debian/debian/patches/preserve-newlines @@ -0,0 +1,33 @@ +commit 26cc6a56bd4a7d8b31673f1ee47198a2949b3af3 +Author: Joachim Breitner <mail@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 000000000..3ac8fc295 --- /dev/null +++ b/p/haskell-debian/debian/patches/series @@ -0,0 +1 @@ +preserve-newlines |