debian 3.85 → 3.85.2
raw patch · 5 files changed
+49/−28 lines, 5 filesdep −process-listlikedep ~ListLikedep ~process-extrasPVP ok
version bump matches the API change (PVP)
Dependencies removed: process-listlike
Dependency ranges changed: ListLike, process-extras
API changes (from Hackage documentation)
Files
- Debian/Control/Common.hs +20/−8
- Debian/Control/Text.hs +2/−2
- changelog +7/−1
- debian.cabal +4/−16
- debian/changelog +16/−1
Debian/Control/Common.hs view
@@ -20,8 +20,8 @@ where import Data.Char (isSpace)-import Data.List (partition, intersperse)-import Data.ListLike as LL (ListLike, dropWhile, empty, cons, find, reverse)+import Data.List as List (dropWhileEnd, partition, intersperse)+import Data.ListLike as LL (ListLike, cons, dropWhileEnd, empty, find, null, singleton) import Data.ListLike.String as LL (StringLike, lines, unlines) import Data.Monoid ((<>)) import Debian.Pretty (PP(..))@@ -74,14 +74,26 @@ -- | This can usually be used as the implementation of protectFieldText protectFieldText' :: forall a. (StringLike a, ListLike a Char) => ControlFunctions a => a -> a protectFieldText' s =- case LL.lines s of+ let trimmedLines :: [a]+ trimmedLines = map (LL.dropWhileEnd isSpace :: a -> a) $ (LL.lines s :: [a])+ strippedLines :: [a]+ strippedLines = List.dropWhileEnd LL.null trimmedLines in+ -- Split the text into lines, drop trailing whitespace from each+ -- line, and drop trailing blank lines.+ case strippedLines of [] -> empty- (l : ls) -> dropWhileEnd isSpace $ LL.unlines $ l : map protect ls+ (l : ls) ->+ let -- The first line is indented one space+ l' = {-LL.cons ' '-} l+ -- Null lines are replaced by a single '.' If any line+ -- is unindented, all will get an additional space of+ -- indentation.+ ls' = case all indented ls of+ True -> map (\ x -> if LL.null x then (LL.cons ' ' $ singleton '.') else x) ls+ False -> map (LL.cons ' ') $ map (\ x -> if LL.null x then (singleton '.') else x) ls in+ LL.dropWhileEnd isSpace (LL.unlines (l' : ls')) where- dropWhileEnd :: (Char -> Bool) -> a -> a- dropWhileEnd func = LL.reverse . LL.dropWhile func . LL.reverse -- foldr (\x xs -> if func x && LL.null xs then LL.empty else LL.cons x xs) empty- protect :: a -> a- protect l = maybe empty (\ c -> if elem c " \t" then l else LL.cons ' ' l) (LL.find (const True) l)+ indented l = maybe True isSpace (LL.find (const True) l) -- | This may have bad performance issues (dsf: Whoever wrote this -- comment should have explained why.)
Debian/Control/Text.hs view
@@ -27,9 +27,9 @@ ) where import qualified Data.ByteString.Char8 as B-import Data.Char (toLower, chr, isSpace)+import Data.Char (toLower, chr) import Data.List (find)-import qualified Data.Text as T (Text, pack, unpack, map, strip, reverse, dropWhileEnd)+import qualified Data.Text as T (Text, pack, unpack, map, strip, reverse) import Data.Text.Encoding (decodeUtf8With, encodeUtf8) --import Data.Text.IO as T (readFile) import qualified Debian.Control.ByteString as B
changelog view
@@ -1,4 +1,10 @@-haskell-debian (3.84.2) unstable; urgency=low+haskell-debian (3.85.1) unstable; urgency=low++ * Allow build with process-extras-0.2.0++ -- David Fox <dsf@seereason.com> Thu, 04 Dec 2014 06:23:38 -0800++haskell-debian (3.85) unstable; urgency=low * Fix some cases where the pretty printer output parsed to something different from its input
debian.cabal view
@@ -1,5 +1,5 @@ Name: debian-Version: 3.85+Version: 3.85.2 License: BSD3 License-File: debian/copyright Author: David Fox <dsf@seereason.com>, Jeremy Shaw <jeremy@seereason.com>, Clifford Beshers <beshers@seereason.com>@@ -20,10 +20,6 @@ Description: Get Network.URI from the network-uri package Default: True -Flag listlike- Description: Use process-listlike instead of process-extra- Default: True- Library Hs-Source-Dirs: . Build-Depends:@@ -37,13 +33,14 @@ filepath, HaXml >= 1.20, HUnit,- ListLike >= 4,+ ListLike >= 4.1.1, mtl, old-locale, parsec >= 2 && <4, pretty, prettyclass, process,+ process-extras >= 0.2.0, pureMD5, regex-compat, regex-tdfa,@@ -59,11 +56,6 @@ else Build-Depends: network >= 2.4 && < 2.6 - if flag(listlike)- build-depends: process-listlike >= 0.9- else- build-depends: process-extras- ghc-options: -Wall -O2 Exposed-modules: Debian.Apt.Dependencies,@@ -135,15 +127,11 @@ Executable debian-tests Main-is: Test/Main.hs ghc-options: -threaded -W -O2- Build-Depends: ansi-wl-pprint, base, bytestring, containers, debian, directory, exceptions, HUnit, ListLike, mtl, parsec, pretty, prettyclass, process, regex-compat, regex-tdfa, template-haskell, text, utf8-string+ Build-Depends: ansi-wl-pprint, base, bytestring, containers, debian, directory, exceptions, HUnit, ListLike >= 4.1.1, mtl, parsec, pretty, prettyclass, process, process-extras >= 0.2.0, regex-compat, regex-tdfa, template-haskell, text, utf8-string if flag(network-uri) Build-Depends: network >= 2.6, network-uri >= 2.6 else Build-Depends: network >= 2.4 && < 2.6- if flag(listlike)- build-depends: process-listlike >= 0.9- else- build-depends: process-extras source-repository head type: git
debian/changelog view
@@ -1,4 +1,19 @@-haskell-debian (3.84.2) unstable; urgency=low+haskell-debian (3.85.2) unstable; urgency=low++ * If any of the lines of a multi-line control file field are not+ indented, indent all the lines by one space.+ * When formatting multi-line control file fields, make sure empty+ lines are replaced by a single (indented) '.'.++ -- David Fox <dsf@seereason.com> Wed, 04 Feb 2015 11:23:42 -0800++haskell-debian (3.85.1) unstable; urgency=low++ * Allow build with process-extras-0.2.0++ -- David Fox <dsf@seereason.com> Thu, 04 Dec 2014 06:23:38 -0800++haskell-debian (3.85) unstable; urgency=low * Fix some cases where the pretty printer output parsed to something different from its input