debian 3.66 → 3.69
raw patch · 18 files changed
+137/−97 lines, 18 filesdep +textPVP ok
version bump matches the API change (PVP)
Dependencies added: text
API changes (from Hackage documentation)
- Debian.Changes: parseLog :: String -> [Either [String] ChangeLogEntry]
- Debian.Changes: prettyChanges :: ChangedFileSpec -> Doc
- Debian.Changes: prettyChangesFile :: ChangesFile -> Doc
- Debian.Changes: prettyEntry :: ChangeLogEntry -> Doc
- Debian.Relation: PkgName :: String -> PkgName
- Debian.Relation: newtype PkgName
- Debian.Relation: prettyBinPkgName :: BinPkgName -> Doc
- Debian.Relation: prettySrcPkgName :: SrcPkgName -> Doc
- Debian.Relation: unPkgName :: PkgName -> String
- Debian.Relation.ByteString: data PkgName
- Debian.Relation.Common: PkgName :: String -> PkgName
- Debian.Relation.Common: instance Eq PkgName
- Debian.Relation.Common: instance Ord PkgName
- Debian.Relation.Common: instance Show PkgName
- Debian.Relation.Common: newtype PkgName
- Debian.Relation.Common: prettyBinPkgName :: BinPkgName -> Doc
- Debian.Relation.Common: prettySrcPkgName :: SrcPkgName -> Doc
- Debian.Relation.Common: unPkgName :: PkgName -> String
- Debian.Relation.String: data PkgName
+ Debian.Changes: ChangeLog :: [ChangeLogEntry] -> ChangeLog
+ Debian.Changes: instance Eq ChangeLog
+ Debian.Changes: instance Pretty ChangeLog
+ Debian.Changes: instance Pretty ChangeLogEntry
+ Debian.Changes: instance Pretty ChangedFileSpec
+ Debian.Changes: instance Pretty ChangesFile
+ Debian.Changes: newtype ChangeLog
+ Debian.Changes: parseChangeLog :: String -> ChangeLog
+ Debian.Changes: parseEntries :: String -> [Either [String] ChangeLogEntry]
+ Debian.Relation: class PkgName a
+ Debian.Relation: pkgNameFromString :: PkgName a => String -> a
+ Debian.Relation.Common: class PkgName a
+ Debian.Relation.Common: instance PkgName BinPkgName
+ Debian.Relation.Common: instance PkgName SrcPkgName
+ Debian.Relation.Common: pkgNameFromString :: PkgName a => String -> a
- Debian.Relation: BinPkgName :: PkgName -> BinPkgName
+ Debian.Relation: BinPkgName :: String -> BinPkgName
- Debian.Relation: SrcPkgName :: PkgName -> SrcPkgName
+ Debian.Relation: SrcPkgName :: String -> SrcPkgName
- Debian.Relation: prettyPkgName :: PkgName -> Doc
+ Debian.Relation: prettyPkgName :: PkgName a => a -> Doc
- Debian.Relation: unBinPkgName :: BinPkgName -> PkgName
+ Debian.Relation: unBinPkgName :: BinPkgName -> String
- Debian.Relation: unSrcPkgName :: SrcPkgName -> PkgName
+ Debian.Relation: unSrcPkgName :: SrcPkgName -> String
- Debian.Relation.Common: BinPkgName :: PkgName -> BinPkgName
+ Debian.Relation.Common: BinPkgName :: String -> BinPkgName
- Debian.Relation.Common: SrcPkgName :: PkgName -> SrcPkgName
+ Debian.Relation.Common: SrcPkgName :: String -> SrcPkgName
- Debian.Relation.Common: prettyPkgName :: PkgName -> Doc
+ Debian.Relation.Common: prettyPkgName :: PkgName a => a -> Doc
- Debian.Relation.Common: unBinPkgName :: BinPkgName -> PkgName
+ Debian.Relation.Common: unBinPkgName :: BinPkgName -> String
- Debian.Relation.Common: unSrcPkgName :: SrcPkgName -> PkgName
+ Debian.Relation.Common: unSrcPkgName :: SrcPkgName -> String
Files
- Debian/Apt/Dependencies.hs +3/−3
- Debian/Changes.hs +56/−37
- Debian/Control/Common.hs +1/−1
- Debian/Control/PrettyPrint.hs +1/−2
- Debian/Control/String.hs +2/−2
- Debian/Deb.hs +0/−1
- Debian/GenBuildDeps.hs +2/−2
- Debian/Relation.hs +1/−4
- Debian/Relation/ByteString.hs +1/−2
- Debian/Relation/Common.hs +13/−12
- Debian/Relation/String.hs +2/−3
- Debian/Version.hs +1/−1
- Test/Changes.hs +24/−20
- Test/Dependencies.hs +3/−3
- debian.cabal +2/−1
- debian/changelog +23/−0
- utils/AptGetBuildDeps.hs +1/−1
- utils/Report.hs +1/−2
Debian/Apt/Dependencies.hs view
@@ -20,7 +20,7 @@ import Data.Tree(Tree(rootLabel, Node)) import Debian.Apt.Package(PackageNameMap, packageNameMap, lookupPackageByRel) import Debian.Control.ByteString(ControlFunctions(stripWS, lookupP, parseControlFromFile), Field'(Field), Control'(Control), Paragraph, Control)-import Debian.Relation (BinPkgName(..), PkgName(..))+import Debian.Relation (BinPkgName(..)) import Debian.Relation.ByteString(ParseRelations(..), Relation(..), OrRelation, AndRelation, Relations, checkVersionReq) import Debian.Version(DebianVersion, parseDebianVersion, prettyDebianVersion) @@ -59,7 +59,7 @@ } where getName :: Paragraph -> BinPkgName- getName p = case lookupP "Package" p of Nothing -> error "Missing Package field" ; (Just (Field (_,n))) -> BinPkgName (PkgName (C.unpack (stripWS n)))+ getName p = case lookupP "Package" p of Nothing -> error "Missing Package field" ; (Just (Field (_,n))) -> BinPkgName (C.unpack (stripWS n)) conflicts' :: Paragraph -> Relations conflicts' p = case lookupP "Conflicts" p of@@ -106,7 +106,7 @@ (Just (Field (_, name))) -> case lookupP "Version" p of Nothing -> error $ "Paragraph missing Version field"- (Just (Field (_, version))) -> (BinPkgName (PkgName (C.unpack (stripWS name))), parseDebianVersion (C.unpack version))+ (Just (Field (_, version))) -> (BinPkgName (C.unpack (stripWS name)), parseDebianVersion (C.unpack version))
Debian/Changes.hs view
@@ -1,24 +1,26 @@+{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-missing-signatures #-} -- |Changelog and changes file support. module Debian.Changes ( ChangesFile(..) , ChangedFileSpec(..) , changesFileName+ , ChangeLog(..) , ChangeLogEntry(..)- , parseLog+ , parseChangeLog+ , parseEntries -- was parseLog , parseEntry , parseChanges- , prettyChanges- , prettyChangesFile- , prettyEntry ) where -import Data.List (intercalate)+import Data.Either (partitionEithers)+import Data.List (intercalate, intersperse)+import Data.Text (pack, unpack, strip) import qualified Debian.Control.String as S import Debian.Release import Debian.URI() import Debian.Version import System.Posix.Types-import Text.Regex.TDFA+import Text.Regex.TDFA hiding (empty) import Text.PrettyPrint.ANSI.Leijen -- |A file generated by dpkg-buildpackage describing the result of a@@ -55,9 +57,11 @@ , logWho :: String , logDate :: String }- | WhiteSpace String- deriving (Eq)+ | WhiteSpace String -- ^ The parser here never returns this+ deriving Eq +newtype ChangeLog = ChangeLog [ChangeLogEntry] deriving Eq+ {- instance Show ChangesFile where show = changesFileName@@ -67,26 +71,32 @@ changesFileName changes = changePackage changes ++ "_" ++ show (prettyDebianVersion (changeVersion changes)) ++ "_" ++ archName (changeArch changes) ++ ".changes" -prettyChangesFile :: ChangesFile -> Doc-prettyChangesFile = text . changesFileName+instance Pretty ChangesFile where+ pretty = text . changesFileName -prettyChanges :: ChangedFileSpec -> Doc-prettyChanges file =- text (changedFileMD5sum file ++ " " ++- show (changedFileSize file) ++ " " ++- sectionName (changedFileSection file) ++ " " ++- changedFilePriority file ++ " " ++- changedFileName file)+instance Pretty ChangedFileSpec where+ pretty file =+ text (changedFileMD5sum file ++ " " +++ show (changedFileSize file) ++ " " +++ sectionName (changedFileSection file) ++ " " +++ changedFilePriority file ++ " " +++ changedFileName file) -prettyEntry :: ChangeLogEntry -> Doc-prettyEntry (Entry package version dists urgency details who date) =- text (package ++ " (" ++ show (prettyDebianVersion version) ++ ") " ++ intercalate " " (map releaseName' dists) ++ "; urgency=" ++ urgency ++ "\n\n" ++- details ++ " -- " ++ who ++ " " ++ date ++ "\n\n")+instance Pretty ChangeLogEntry where+ pretty (Entry package ver dists urgency details who date) =+ vcat [ text (package ++ " (" ++ show (prettyDebianVersion ver) ++ ") " ++ intercalate " " (map releaseName' dists) ++ "; urgency=" ++ urgency)+ , empty+ , text details+ , text (" -- " ++ who ++ " " ++ date)+ , empty ] +instance Pretty ChangeLog where+ pretty (ChangeLog xs) = vcat (map pretty xs)+ -- |Show just the top line of a changelog entry (for debugging output.)-showHeader :: ChangeLogEntry -> Doc-showHeader (Entry package version dists urgency _ _ _) =- text (package ++ " (" ++ show (prettyDebianVersion version) ++ ") " ++ intercalate " " (map releaseName' dists) ++ "; urgency=" ++ urgency ++ "...")+_showHeader :: ChangeLogEntry -> Doc+_showHeader (Entry package ver dists urgency _ _ _) =+ text (package ++ " (" ++ show (prettyDebianVersion ver) ++ ") " ++ intercalate " " (map releaseName' dists) ++ "; urgency=" ++ urgency ++ "...") {- format is a series of entries like this:@@ -143,13 +153,21 @@ The entire changelog must be encoded in UTF-8. -} +-- | Parse the entries of a debian changelog and verify they are all+-- valid.+parseChangeLog :: String -> ChangeLog+parseChangeLog s =+ case partitionEithers (parseEntries s) of+ ([], xs) -> ChangeLog xs+ (ss, _) -> error (intercalate "\n " ("Error(s) parsing changelog:" : concat ss))+ -- |Parse a Debian Changelog and return a lazy list of entries-parseLog :: String -> [Either [String] ChangeLogEntry]-parseLog "" = []-parseLog text =+parseEntries :: String -> [Either [String] ChangeLogEntry]+parseEntries "" = []+parseEntries text = case parseEntry text of Left messages -> [Left messages]- Right (entry, text') -> Right entry : parseLog text'+ Right (entry, text') -> Right entry : parseEntries text' -- |Parse a single changelog entry, returning the entry and the remaining text. {-@@ -177,16 +195,16 @@ parseEntry text = case text =~ entryRE :: MatchResult String of x | mrSubList x == [] -> Left ["Parse error in " ++ show text]- x@MR {mrAfter = after, mrSubList = [_, name, version, dists, urgency, _, details, _, _, who, _, date, _]} ->+ MR {mrAfter = after, mrSubList = [_, name, ver, dists, urgency, _, details, _, _, who, _, date, _]} -> Right (Entry name - (parseDebianVersion version)+ (parseDebianVersion ver) (map parseReleaseName . words $ dists) urgency- details+ (" " ++ unpack (strip (pack details)) ++ "\n") (take (length who - 2) who) date, after)- x@MR {mrBefore = before, mrMatch = matched, mrAfter = after, mrSubList = matches} ->+ MR {mrBefore = _before, mrMatch = _matched, mrAfter = after, mrSubList = matches} -> Left ["Internal error\n after=" ++ show after ++ "\n " ++ show (length matches) ++ " matches: " ++ show matches] {- parseREs :: [Regex] -> String -> Failing ([String], String)@@ -219,9 +237,9 @@ parseChanges text = case text =~ changesRE :: MatchResult String of MR {mrSubList = []} -> Nothing- MR {mrSubList = [_, name, version, dists, urgency, _, details]} ->+ MR {mrSubList = [_, name, ver, dists, urgency, _, details]} -> Just $ Entry name- (parseDebianVersion version)+ (parseDebianVersion ver) (map parseReleaseName . words $ dists) urgency details@@ -231,10 +249,10 @@ changesRE = bol ++ blankLines ++ optWhite ++ headerRE ++ "(.*)$" headerRE =- package ++ version ++ dists ++ urgency+ package ++ ver ++ dists ++ urgency where package = "([^ \t(]*)" ++ optWhite- version = "\\(([^)]*)\\)" ++ optWhite+ ver = "\\(([^)]*)\\)" ++ optWhite dists = "([^;]*);" ++ optWhite urgency = "urgency=([^\n]*)\n" ++ blankLines @@ -243,7 +261,8 @@ optWhite = "[ \t]*" bol = "^" -s1 = intercalate "\n" +-- This can be used for tests+_s1 = intercalate "\n" ["haskell-regex-compat (0.92-3+seereason1~jaunty4) jaunty-seereason; urgency=low", "", " [ Joachim Breitner ]",
Debian/Control/Common.hs view
@@ -34,7 +34,7 @@ -- name or value data Field' a = Field (a, a)- | Comment a+ | Comment a -- ^ Lines beginning with # deriving Eq class ControlFunctions a where
Debian/Control/PrettyPrint.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} module Debian.Control.PrettyPrint where -import Data.List (intersperse) import qualified Data.ByteString.Char8 as C import Text.PrettyPrint.ANSI.Leijen @@ -17,7 +16,7 @@ ppField :: (ToText a) => Field' a -> Doc ppField (Field (n,v)) = totext n <> text ":" <> totext v-+ppField (Comment c) = totext c class ToText a where totext :: a -> Doc
Debian/Control/String.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE FlexibleInstances, ScopedTypeVariables, TypeSynonymInstances #-}-{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-name-shadowing -fno-warn-unused-do-bind #-} module Debian.Control.String ( -- * Types Control'(..)@@ -29,7 +29,7 @@ import Text.ParserCombinators.Parsec import System.IO import Debian.Control.Common-import Text.PrettyPrint.ANSI.Leijen (Pretty(pretty), text, vcat, (<$>), empty)+import Text.PrettyPrint.ANSI.Leijen (Pretty(pretty), text, vcat, empty) -- |This may have bad performance issues (why?) instance Pretty (Control' String) where
Debian/Deb.hs view
@@ -3,7 +3,6 @@ import Control.Monad -import Data.ByteString.Lazy (empty) import Debian.Control.Common import System.Exit (ExitCode(..)) import System.Process (readProcessWithExitCode)
Debian/GenBuildDeps.hs view
@@ -55,7 +55,7 @@ buildDependencies (Control (source:binaries)) = either (Left . concat) (\ deps -> Right (DepInfo {sourceName = sourcePackage, relations = deps, binaryNames = bins})) deps where- sourcePackage = maybe (error "First Paragraph in control file lacks a Source field") (SrcPkgName . PkgName) $ assoc "Source" source+ sourcePackage = maybe (error "First Paragraph in control file lacks a Source field") SrcPkgName $ assoc "Source" source -- The raw list of build dependencies for this package deps = either Left (Right . concat) (concatEithers [buildDeps, buildDepsIndep]) buildDeps =@@ -68,7 +68,7 @@ _ -> Right [] bins = mapMaybe lookupPkgName binaries lookupPkgName :: Paragraph -> Maybe BinPkgName- lookupPkgName p = maybe Nothing (Just . BinPkgName . PkgName) (assoc "Package" p)+ lookupPkgName p = maybe Nothing (Just . BinPkgName) (assoc "Package" p) -- |Specifies build dependencies that should be ignored during the build -- decision. If the pair is (BINARY, Nothing) it means the binary package
Debian/Relation.hs view
@@ -4,9 +4,6 @@ PkgName(..) , SrcPkgName(..) , BinPkgName(..)- , prettyPkgName- , prettySrcPkgName- , prettyBinPkgName , AndRelation , OrRelation , Relations@@ -21,5 +18,5 @@ , ParseRelations(..) ) where -import Debian.Relation.Common (prettyRelation, SrcPkgName(..), BinPkgName(..), PkgName(..), prettyPkgName, prettySrcPkgName, prettyBinPkgName)+import Debian.Relation.Common (prettyRelation, SrcPkgName(..), BinPkgName(..), PkgName(prettyPkgName, pkgNameFromString)) import Debian.Relation.String
Debian/Relation/ByteString.hs view
@@ -1,8 +1,7 @@ -- |A module for working with debian relationships <http://www.debian.org/doc/debian-policy/ch-relationships.html> module Debian.Relation.ByteString ( -- * Types- PkgName- , AndRelation+ AndRelation , OrRelation , Relations , Relation(..)
Debian/Relation/Common.hs view
@@ -5,7 +5,7 @@ import Data.List import Text.ParserCombinators.Parsec import Data.Function-import Text.PrettyPrint.ANSI.Leijen (Doc, text)+import Text.PrettyPrint.ANSI.Leijen (Doc, text, (<>)) -- Local Modules @@ -19,19 +19,20 @@ data Relation = Rel BinPkgName (Maybe VersionReq) (Maybe ArchitectureReq) deriving Eq -newtype PkgName = PkgName {unPkgName :: String} deriving (Show, Eq, Ord)--newtype SrcPkgName = SrcPkgName {unSrcPkgName :: PkgName} deriving (Show, Eq, Ord)-newtype BinPkgName = BinPkgName {unBinPkgName :: PkgName} deriving (Show, Eq, Ord)+newtype SrcPkgName = SrcPkgName {unSrcPkgName :: String} deriving (Show, Eq, Ord)+newtype BinPkgName = BinPkgName {unBinPkgName :: String} deriving (Show, Eq, Ord) -prettySrcPkgName :: SrcPkgName -> Doc-prettySrcPkgName = prettyPkgName . unSrcPkgName+class PkgName a where+ prettyPkgName :: a -> Doc+ pkgNameFromString :: String -> a -prettyBinPkgName :: BinPkgName -> Doc-prettyBinPkgName = prettyPkgName . unBinPkgName+instance PkgName BinPkgName where+ prettyPkgName = text . unBinPkgName+ pkgNameFromString = BinPkgName -prettyPkgName :: PkgName -> Doc-prettyPkgName = text . unPkgName+instance PkgName SrcPkgName where+ prettyPkgName = text . unSrcPkgName+ pkgNameFromString = SrcPkgName class ParseRelations a where -- |'parseRelations' parse a debian relation (i.e. the value of a@@ -42,7 +43,7 @@ prettyRelation :: Relation -> Doc prettyRelation (Rel name ver arch) =- text (unPkgName (unBinPkgName name) ++ maybe "" (show . prettyVersionReq) ver ++ maybe "" (show . prettyArchitectureReq) arch)+ prettyPkgName name <> text (maybe "" (show . prettyVersionReq) ver ++ maybe "" (show . prettyArchitectureReq) arch) instance Ord Relation where compare (Rel pkgName1 mVerReq1 _mArch1) (Rel pkgName2 mVerReq2 _mArch2) =
Debian/Relation/String.hs view
@@ -2,8 +2,7 @@ -- |A module for working with debian relationships <http://www.debian.org/doc/debian-policy/ch-relationships.html> module Debian.Relation.String ( -- * Types- PkgName- , AndRelation+ AndRelation , OrRelation , Relations , Relation(..)@@ -68,7 +67,7 @@ mVerReq <- pMaybeVerReq skipMany whiteChar mArch <- pMaybeArch- return $ Rel (BinPkgName (PkgName pkgName)) mVerReq mArch+ return $ Rel (BinPkgName pkgName) mVerReq mArch pMaybeVerReq :: RelParser (Maybe VersionReq) pMaybeVerReq =
Debian/Version.hs view
@@ -12,4 +12,4 @@ ) where import Debian.Version.Common-import Debian.Version.String+import Debian.Version.String ()
Test/Changes.hs view
@@ -6,10 +6,13 @@ import Debian.Changes import Debian.Release (ReleaseName(ReleaseName, relName)) import Debian.Version (DebianVersion, prettyDebianVersion, parseDebianVersion)+import Text.PrettyPrint.ANSI.Leijen instance Show DebianVersion where show = show . prettyDebianVersion deriving instance Show ChangeLogEntry+instance Show ChangeLog where+ show = show . pretty s3 = unlines ["name (version) dist; urgency=urgency",@@ -96,12 +99,11 @@ " -- Arjan Oosting <arjan@debian.org> Sat, 19 Jan 2008 16:48:39 +0100", "", "haskell-regex-compat (0.71.0.1-1) unstable; urgency=low",- " ",+ "", " * Initial release (used to be part of ghc6).", " * Using \"Generic Haskell cabal library packaging files v9\".",- " ",- " -- Ian Lynagh (wibble) <igloo@debian.org> Wed, 21 Nov 2007 01:26:57 +0000",- " "]+ "",+ " -- Ian Lynagh (wibble) <igloo@debian.org> Wed, 21 Nov 2007 01:26:57 +0000"] s2 = unlines ["haskell-haskeline (0.6.1.6-1+seereason1~jaunty6) jaunty-seereason; urgency=low",@@ -159,52 +161,54 @@ " -- Marco Túlio Gontijo e Silva <marcot@holoscopio.com> Wed, 11 Mar 2009 18:58:06 -0300", ""] +test5 = TestCase (assertEqual "haskell-regex-compat changelog" s1 (show (pretty (parseChangeLog s1))))+ test3 =- TestCase (assertEqual "haskell-regex-compat changelog" expected (parseLog s3))+ TestCase (assertEqual "haskell-regex-compat changelog" expected (parseEntries s3)) where expected = [Right (Entry {logPackage = "name", logVersion = parseDebianVersion "version", logDists = [ReleaseName {relName = "dist"}], logUrgency = "urgency", logComments = " * details\n", logWho = "David Fox <dsf@seereason.com>", logDate = "Wed, 21 Nov 2007 01:26:57 +0000"})] test4 =- TestCase (assertEqual "haskell-regex-compat changelog" expected (parseLog s4))+ TestCase (assertEqual "haskell-regex-compat changelog" expected (parseEntries s4)) where expected = [Right (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-3+seereason1~jaunty4", logDists = [ReleaseName {relName = "jaunty-seereason"}], logUrgency = "low",- logComments = " [ Joachim Breitner ]\n * Adjust priority according to override file\n * Depend on hscolour (Closes: #550769)\n\n [ Marco T\250lio Gontijo e Silva ]\n\n",+ logComments = " [ Joachim Breitner ]\n * Adjust priority according to override file\n * Depend on hscolour (Closes: #550769)\n\n [ Marco T\250lio Gontijo e Silva ]\n", logWho = "David Fox <dsf@seereason.com>", logDate = "Wed, 21 Nov 2007 01:26:57 +0000"})] test1 =- TestCase (assertEqual "haskell-regex-compat changelog" expected (parseLog s1))- where expected = [Right (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-3+seereason1~jaunty4", logDists = [ReleaseName {relName = "jaunty-seereason"}], logUrgency = "low", logComments = " [ Joachim Breitner ]\n * Adjust priority according to override file\n * Depend on hscolour (Closes: #550769)\n\n [ Marco T\250lio Gontijo e Silva ]\n * debian/control: Use more sintetic name for Vcs-Darcs.\n * Built from sid apt pool\n * Build dependency changes:\n cpphs: 1.9-1+seereason1~jaunty5 -> 1.9-1+seereason1~jaunty6\n ghc6: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n ghc6-doc: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n ghc6-prof: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n haddock: 2.4.2-3+seereason3~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n haskell-devscripts: 0.6.18-21+seereason1~jaunty1 -> 0.6.18-23+seereason1~jaunty1\n haskell-regex-base-doc: 0.93.1-5+seereason1~jaunty1 -> 0.93.1-5++1+seereason1~jaunty1\n haskell-regex-posix-doc: 0.93.2-4+seereason1~jaunty1 -> 0.93.2-4+seereason1~jaunty2\n libghc6-regex-base-dev: 0.93.1-5+seereason1~jaunty1 -> 0.93.1-5++1+seereason1~jaunty1\n libghc6-regex-base-prof: 0.93.1-5+seereason1~jaunty1 -> 0.93.1-5++1+seereason1~jaunty1\n libghc6-regex-posix-dev: 0.93.2-4+seereason1~jaunty1 -> 0.93.2-4+seereason1~jaunty2\n libghc6-regex-posix-prof: 0.93.2-4+seereason1~jaunty1 -> 0.93.2-4+seereason1~jaunty2\n\n", logWho = "SeeReason Autobuilder <autobuilder@seereason.org>", logDate = "Fri, 25 Dec 2009 01:55:37 -0800"}),- Right (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-3", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " [ Joachim Breitner ]\n * Adjust priority according to override file\n * Depend on hscolour (Closes: #550769)\n\n [ Marco T\250lio Gontijo e Silva ]\n * debian/control: Use more sintetic name for Vcs-Darcs.\n\n", logWho = "Joachim Breitner <nomeata@debian.org>", logDate = "Mon, 20 Jul 2009 13:05:35 +0200"}),- Right (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-2", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * Adopt package for the Debian Haskell Group\n * Fix \"FTBFS with new dpkg-dev\" by adding comma to debian/control\n (Closes: #536473)\n\n", logWho = "Joachim Breitner <nomeata@debian.org>", logDate = "Mon, 20 Jul 2009 12:05:40 +0200"}),- Right (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-1.1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * Rebuild for GHC 6.10.\n * NMU with permission of the author.\n\n", logWho = "John Goerzen <jgoerzen@complete.org>", logDate = "Mon, 16 Mar 2009 10:12:04 -0500"}),- Right (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * New upstream release\n * debian/control:\n - Bump Standards-Version. No changes needed.\n\n", logWho = "Arjan Oosting <arjan@debian.org>", logDate = "Sun, 18 Jan 2009 00:05:02 +0100"}),- Right (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.91-1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * Take over package from Ian, as I already maintain haskell-regex-base,\n and move Ian to the Uploaders field.\n * Packaging complete redone (based on my haskell-regex-base package).\n\n", logWho = "Arjan Oosting <arjan@debian.org>", logDate = "Sat, 19 Jan 2008 16:48:39 +0100"}),- Right (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.71.0.1-1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * Initial release (used to be part of ghc6).\n * Using \"Generic Haskell cabal library packaging files v9\".\n \n", logWho = "Ian Lynagh (wibble) <igloo@debian.org>", logDate = "Wed, 21 Nov 2007 01:26:57 +0000"})]+ TestCase (assertEqual "haskell-regex-compat changelog" expected (parseChangeLog s1))+ where expected = ChangeLog [(Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-3+seereason1~jaunty4", logDists = [ReleaseName {relName = "jaunty-seereason"}], logUrgency = "low", logComments = " [ Joachim Breitner ]\n * Adjust priority according to override file\n * Depend on hscolour (Closes: #550769)\n\n [ Marco T\250lio Gontijo e Silva ]\n * debian/control: Use more sintetic name for Vcs-Darcs.\n * Built from sid apt pool\n * Build dependency changes:\n cpphs: 1.9-1+seereason1~jaunty5 -> 1.9-1+seereason1~jaunty6\n ghc6: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n ghc6-doc: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n ghc6-prof: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n haddock: 2.4.2-3+seereason3~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n haskell-devscripts: 0.6.18-21+seereason1~jaunty1 -> 0.6.18-23+seereason1~jaunty1\n haskell-regex-base-doc: 0.93.1-5+seereason1~jaunty1 -> 0.93.1-5++1+seereason1~jaunty1\n haskell-regex-posix-doc: 0.93.2-4+seereason1~jaunty1 -> 0.93.2-4+seereason1~jaunty2\n libghc6-regex-base-dev: 0.93.1-5+seereason1~jaunty1 -> 0.93.1-5++1+seereason1~jaunty1\n libghc6-regex-base-prof: 0.93.1-5+seereason1~jaunty1 -> 0.93.1-5++1+seereason1~jaunty1\n libghc6-regex-posix-dev: 0.93.2-4+seereason1~jaunty1 -> 0.93.2-4+seereason1~jaunty2\n libghc6-regex-posix-prof: 0.93.2-4+seereason1~jaunty1 -> 0.93.2-4+seereason1~jaunty2\n", logWho = "SeeReason Autobuilder <autobuilder@seereason.org>", logDate = "Fri, 25 Dec 2009 01:55:37 -0800"}),+ (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-3", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " [ Joachim Breitner ]\n * Adjust priority according to override file\n * Depend on hscolour (Closes: #550769)\n\n [ Marco T\250lio Gontijo e Silva ]\n * debian/control: Use more sintetic name for Vcs-Darcs.\n", logWho = "Joachim Breitner <nomeata@debian.org>", logDate = "Mon, 20 Jul 2009 13:05:35 +0200"}),+ (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-2", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * Adopt package for the Debian Haskell Group\n * Fix \"FTBFS with new dpkg-dev\" by adding comma to debian/control\n (Closes: #536473)\n", logWho = "Joachim Breitner <nomeata@debian.org>", logDate = "Mon, 20 Jul 2009 12:05:40 +0200"}),+ (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-1.1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * Rebuild for GHC 6.10.\n * NMU with permission of the author.\n", logWho = "John Goerzen <jgoerzen@complete.org>", logDate = "Mon, 16 Mar 2009 10:12:04 -0500"}),+ (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.92-1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * New upstream release\n * debian/control:\n - Bump Standards-Version. No changes needed.\n", logWho = "Arjan Oosting <arjan@debian.org>", logDate = "Sun, 18 Jan 2009 00:05:02 +0100"}),+ (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.91-1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * Take over package from Ian, as I already maintain haskell-regex-base,\n and move Ian to the Uploaders field.\n * Packaging complete redone (based on my haskell-regex-base package).\n", logWho = "Arjan Oosting <arjan@debian.org>", logDate = "Sat, 19 Jan 2008 16:48:39 +0100"}),+ (Entry {logPackage = "haskell-regex-compat", logVersion = parseDebianVersion "0.71.0.1-1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low", logComments = " * Initial release (used to be part of ghc6).\n * Using \"Generic Haskell cabal library packaging files v9\".\n", logWho = "Ian Lynagh (wibble) <igloo@debian.org>", logDate = "Wed, 21 Nov 2007 01:26:57 +0000"})] test2 =- TestCase (assertEqual "haskell-regex-compat changelog" expected (parseLog s2))+ TestCase (assertEqual "haskell-regex-compat changelog" expected (parseEntries s2)) where expected = [Right (Entry {logPackage = "haskell-haskeline", logVersion = parseDebianVersion "0.6.1.6-1+seereason1~jaunty6", logDists = [ReleaseName {relName = "jaunty-seereason"}], logUrgency = "low",- logComments = " * New upstream version.\n * Remove extensible-exceptions patch, since ghc6 now ships it.\n * debian/control:\n - Use versioned Build-Depends.\n - Use unversioned Recommends for ghc6-doc in libghc6-terminfo-doc.\n - Use haskell Section.\n - Use new Standards-Version: 3.8.1.\n - Use DM-Upload-Allowed: yes.\n - Use haskell:Recommends and haskell:Suggests.\n - Don't use shlibs:Depends for -prof.\n - Split dependencies in more than one line.\n * Built from sid apt pool\n * Build dependency changes:\n ghc6: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n ghc6-doc: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n ghc6-prof: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n haddock: 2.4.2-3+seereason3~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n haskell-devscripts: 0.6.18-21+seereason1~jaunty1 -> 0.6.18-23+seereason1~jaunty1\n libghc6-mtl-dev: 1.1.0.2-7+seereason3~jaunty7 -> 1.1.0.2-7+seereason3~jaunty8\n libghc6-mtl-doc: 1.1.0.2-7+seereason3~jaunty7 -> 1.1.0.2-7+seereason3~jaunty8\n libghc6-mtl-prof: 1.1.0.2-7+seereason3~jaunty7 -> 1.1.0.2-7+seereason3~jaunty8\n libghc6-terminfo-dev: 0.3.0.2-2+seereason1~jaunty5 -> 0.3.0.2-2+seereason1~jaunty6\n libghc6-terminfo-doc: 0.3.0.2-2+seereason1~jaunty5 -> 0.3.0.2-2+seereason1~jaunty6\n libghc6-terminfo-prof: 0.3.0.2-2+seereason1~jaunty5 -> 0.3.0.2-2+seereason1~jaunty6\n libghc6-utf8-string-dev: 0.3.5-1+seereason3~jaunty7 -> 0.3.5-1++1+seereason1~jaunty1\n libghc6-utf8-string-doc: 0.3.5-1+seereason3~jaunty7 -> 0.3.5-1++1+seereason1~jaunty1\n libghc6-utf8-string-prof: 0.3.5-1+seereason3~jaunty7 -> 0.3.5-1++1+seereason1~jaunty1\n\n",+ logComments = " * New upstream version.\n * Remove extensible-exceptions patch, since ghc6 now ships it.\n * debian/control:\n - Use versioned Build-Depends.\n - Use unversioned Recommends for ghc6-doc in libghc6-terminfo-doc.\n - Use haskell Section.\n - Use new Standards-Version: 3.8.1.\n - Use DM-Upload-Allowed: yes.\n - Use haskell:Recommends and haskell:Suggests.\n - Don't use shlibs:Depends for -prof.\n - Split dependencies in more than one line.\n * Built from sid apt pool\n * Build dependency changes:\n ghc6: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n ghc6-doc: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n ghc6-prof: 6.10.4-1+seereason5~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n haddock: 2.4.2-3+seereason3~jaunty1 -> 6.12.1-0+seereason1~jaunty1\n haskell-devscripts: 0.6.18-21+seereason1~jaunty1 -> 0.6.18-23+seereason1~jaunty1\n libghc6-mtl-dev: 1.1.0.2-7+seereason3~jaunty7 -> 1.1.0.2-7+seereason3~jaunty8\n libghc6-mtl-doc: 1.1.0.2-7+seereason3~jaunty7 -> 1.1.0.2-7+seereason3~jaunty8\n libghc6-mtl-prof: 1.1.0.2-7+seereason3~jaunty7 -> 1.1.0.2-7+seereason3~jaunty8\n libghc6-terminfo-dev: 0.3.0.2-2+seereason1~jaunty5 -> 0.3.0.2-2+seereason1~jaunty6\n libghc6-terminfo-doc: 0.3.0.2-2+seereason1~jaunty5 -> 0.3.0.2-2+seereason1~jaunty6\n libghc6-terminfo-prof: 0.3.0.2-2+seereason1~jaunty5 -> 0.3.0.2-2+seereason1~jaunty6\n libghc6-utf8-string-dev: 0.3.5-1+seereason3~jaunty7 -> 0.3.5-1++1+seereason1~jaunty1\n libghc6-utf8-string-doc: 0.3.5-1+seereason3~jaunty7 -> 0.3.5-1++1+seereason1~jaunty1\n libghc6-utf8-string-prof: 0.3.5-1+seereason3~jaunty7 -> 0.3.5-1++1+seereason1~jaunty1\n", logWho = "SeeReason Autobuilder <autobuilder@seereason.org>", logDate = "Fri, 25 Dec 2009 13:48:18 -0800"}), Right (Entry {logPackage = "haskell-haskeline", logVersion = parseDebianVersion "0.6.1.6-1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low",- logComments = " * New upstream version.\n * Remove extensible-exceptions patch, since ghc6 now ships it.\n * debian/control:\n - Use versioned Build-Depends.\n - Use unversioned Recommends for ghc6-doc in libghc6-terminfo-doc.\n - Use haskell Section.\n - Use new Standards-Version: 3.8.1.\n - Use DM-Upload-Allowed: yes.\n - Use haskell:Recommends and haskell:Suggests.\n - Don't use shlibs:Depends for -prof.\n - Split dependencies in more than one line.\n\n",+ logComments = " * New upstream version.\n * Remove extensible-exceptions patch, since ghc6 now ships it.\n * debian/control:\n - Use versioned Build-Depends.\n - Use unversioned Recommends for ghc6-doc in libghc6-terminfo-doc.\n - Use haskell Section.\n - Use new Standards-Version: 3.8.1.\n - Use DM-Upload-Allowed: yes.\n - Use haskell:Recommends and haskell:Suggests.\n - Don't use shlibs:Depends for -prof.\n - Split dependencies in more than one line.\n", logWho = "Marco T\250lio Gontijo e Silva <marcot@holoscopio.com>", logDate = "Tue, 02 Jun 2009 10:18:27 -0300"}), Right (Entry {logPackage = "haskell-haskeline", logVersion = parseDebianVersion "0.6.1.3-1", logDists = [ReleaseName {relName = "unstable"}], logUrgency = "low",- logComments = " * Initial Debian package. (Closes: #496961)\n\n",+ logComments = " * Initial Debian package. (Closes: #496961)\n", logWho = "Marco T\250lio Gontijo e Silva <marcot@holoscopio.com>", logDate = "Wed, 11 Mar 2009 18:58:06 -0300"})] -changesTests = [test3, test4, test1, test2]+changesTests = [test3, test4, test1, test2, test5]
Test/Dependencies.hs view
@@ -102,7 +102,7 @@ } where getName :: [(String, String)] -> BinPkgName- getName p = case lookup "Package" p of Nothing -> error "Missing Package field" ; (Just n) -> BinPkgName (PkgName (stripWS n))+ getName p = case lookup "Package" p of Nothing -> error "Missing Package field" ; (Just n) -> BinPkgName (stripWS n) conflicts' :: [(String, String)] -> Relations conflicts' p = case lookup "Conflicts" p of@@ -114,7 +114,7 @@ case lookup "Provides" p of Nothing -> [] (Just v) ->- map (BinPkgName . PkgName) $ parseCommaList v+ map BinPkgName $ parseCommaList v parseCommaList :: String -> [String] parseCommaList str =@@ -128,7 +128,7 @@ case lookup "Version" p of Nothing -> error $ "Could not find Package in " ++ show p (Just v) -> - (BinPkgName (PkgName (stripWS n)), parseDebianVersion v)+ (BinPkgName (stripWS n), parseDebianVersion v) mapSnd :: (b -> c) -> [(a,b)] -> [(a,c)] mapSnd f = map (second f)
debian.cabal view
@@ -1,5 +1,5 @@ Name: debian-Version: 3.66+Version: 3.69 License: BSD3 License-File: debian/copyright Author: David Fox <dsf@seereason.com>, Jeremy Shaw <jeremy@seereason.com>, Clifford Beshers <beshers@seereason.com>@@ -40,6 +40,7 @@ pureMD5, regex-compat, regex-tdfa,+ text, time, unix, Unixutils >= 1.50,
debian/changelog view
@@ -1,3 +1,26 @@+haskell-debian (3.69) unstable; urgency=low++ * Fix changelog formatting by adding a newtype named ChangeLog with+ a Pretty instance.+ * Rename parseLog -> parseEntries, add a parseChangeLog function.++ -- David Fox <dsf@seereason.com> Mon, 19 Nov 2012 11:10:37 -0800++haskell-debian (3.68) unstable; urgency=low++ * Fix the formatting of changelog entries (an extra newline was being+ appended) and replace the functions prettyChanges, prettyChangesFile,+ and prettyEntry with instances of Pretty.++ -- David Fox <dsf@seereason.com> Sun, 18 Nov 2012 07:04:28 -0800++haskell-debian (3.67) unstable; urgency=low++ * Eliminate the PkgName type, instead make BinPkgName and SrcPkgName+ instances of a class named PkgName.++ -- David Fox <dsf@seereason.com> Sat, 17 Nov 2012 06:11:06 -0800+ haskell-debian (3.66) unstable; urgency=low * Eliminate the use of the tiny pretty-class package, use the Pretty
utils/AptGetBuildDeps.hs view
@@ -33,7 +33,7 @@ aptGetInstall :: [String] -> [BinPkgName] -> IO ExitCode aptGetInstall options pkgnames = do (_,_,_,ph)- <- createProcess $ proc "apt-get" $ ["install"] ++ options ++ map (unPkgName . unBinPkgName) pkgnames+ <- createProcess $ proc "apt-get" $ ["install"] ++ options ++ map unBinPkgName pkgnames waitForProcess ph main :: IO ()
utils/Report.hs view
@@ -2,7 +2,6 @@ module Main where import Control.Monad-import Data.List import Data.Maybe (fromMaybe) import Debian.Apt.Methods import Debian.Report@@ -43,7 +42,7 @@ mkDocument styleSheet elem = let xmlDecl = XMLDecl "1.0" (Just (EncodingDecl "utf-8")) (Just True) prolog = Prolog (Just xmlDecl) [] Nothing [PI ("xml-stylesheet","type=\"text/xsl\" href=\""++styleSheet++"\"")]- symTable = []+ -- symTable = [] in Document prolog [] elem []