debian 4.1 → 4.1.1
raw patch · 6 files changed
+19/−21 lines, 6 filesdep −QuickCheckdep −eitherdep −old-localePVP ok
version bump matches the API change (PVP)
Dependencies removed: QuickCheck, either, old-locale, process-extras, syb, utf8-string
API changes (from Hackage documentation)
+ Debian.Relation: type RestrictionList = OMap String Bool
Files
- Test/Control.hs +4/−4
- debian.cabal +1/−7
- src/Debian/Apt/Dependencies.hs +4/−5
- src/Debian/Control/ByteString.hs +5/−2
- src/Debian/GenBuildDeps.hs +3/−2
- src/Debian/Relation.hs +2/−1
Test/Control.hs view
@@ -74,10 +74,10 @@ input9 = Control {unControl = [Paragraph [Field ("Field1", " field1 content\n"), Field ("Field2", " an actual second field")]]} :: Control' String -- parsed9buggy = Control {unControl = [Paragraph [Field ("Field1"," field1 content")],Paragraph [Field ("Field2"," an actual second field")]]} :: Control' String expected9 = Control {unControl = [Paragraph [Field ("Field1"," field1 content"),Field ("Field2"," an actual second field")]]}- (Right parsed6) = parseControl "string" (prettyShow input6) :: Either ParseError (Control' String)- (Right parsed7) = parseControl "string" (prettyShow input7) :: Either ParseError (Control' String)- (Right parsed8) = parseControl "string" (prettyShow input8) :: Either ParseError (Control' String)- (Right parsed9) = parseControl "string" (prettyShow input9) :: Either ParseError (Control' String)+ parsed6 = either (error . show) id $ (parseControl "string" (prettyShow input6) :: Either ParseError (Control' String))+ parsed7 = either (error . show) id $ (parseControl "string" (prettyShow input7) :: Either ParseError (Control' String))+ parsed8 = either (error . show) id $ (parseControl "string" (prettyShow input8) :: Either ParseError (Control' String))+ parsed9 = either (error . show) id $ (parseControl "string" (prettyShow input9) :: Either ParseError (Control' String)) -- | These paragraphs have no terminating newlines. They are added -- where appropriate to the expected test results.
debian.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 Name: debian-Version: 4.1+Version: 4.1.1 License: BSD-3-Clause License-File: debian/copyright Author: David Fox <dsf@seereason.com>, Jeremy Shaw <jeremy@seereason.com>, Clifford Beshers <beshers@seereason.com>@@ -30,7 +30,6 @@ Cabal >= 2.2.0.1, containers, directory >= 1.2.3.0,- either, exceptions, filepath, hostname,@@ -38,18 +37,14 @@ lens, ListLike >= 4.3.5, mtl,- old-locale, ordered-containers >= 0.2, parsec >= 2 && <4, pretty >= 1.1.2, process,- process-extras >= 0.2.0, pureMD5,- QuickCheck, regex-compat, regex-tdfa, SHA,- syb, template-haskell, temporary, text,@@ -57,7 +52,6 @@ th-orphans, time, unix,- utf8-string, zlib if flag(network-uri) Build-Depends: network-uri >= 2.6
src/Debian/Apt/Dependencies.hs view
@@ -131,7 +131,7 @@ -- |JAS: deal with 'Provides' (can a package provide more than one package?) conflict' :: (BinPkgName, DebianVersion) -> Relation -> Bool-conflict' (pName, pVersion) (Rel pkgName mVersionReq _) =+conflict' (pName, pVersion) (RRel pkgName mVersionReq _ _) = (pName == pkgName) && (checkVersionReq mVersionReq (Just pVersion)) @@ -274,7 +274,6 @@ | (not (lastvar `elem` c)) && null m = cs | null c && null m = ([],[]) -- is this case ever used? | otherwise = combine csp ns ((c, m):acc)- where lastvar =- let (_,(p:_)) = s in (packageVersion csp) p--+ where lastvar = case s of+ (_, p:_) -> packageVersion csp p+ _ -> error "combine: empty stack"
src/Debian/Control/ByteString.hs view
@@ -116,8 +116,11 @@ Nothing -> Left (newErrorMessage (Message ("Failed to parse " ++ sourceName)) (newPos sourceName 0 0)) Just (cntl,_) -> Right cntl lookupP fieldName (Paragraph fields) =- let pFieldName = C.pack (map toLower fieldName) in- find (\ (Field (fieldName',_)) -> C.map toLower fieldName' == pFieldName) fields+ let pFieldName = C.pack (map toLower fieldName)+ matches (Field (fieldName', _)) = C.map toLower fieldName' == pFieldName+ matches (Comment _) = False+ in find matches fields+ -- NOTE: probably inefficient stripWS = C.reverse . strip . C.reverse . strip where strip = C.dropWhile (flip elem [' ', '\t'])
src/Debian/GenBuildDeps.hs view
@@ -149,8 +149,8 @@ , allBlocked = List.map ofVertex blocked } where makeReady :: [Vertex] -> [Vertex] -> Vertex -> ReadyTarget a- makeReady blocked ready thisReady =- let otherReady = filter (/= thisReady) ready+ makeReady blocked ready' thisReady =+ let otherReady = filter (/= thisReady) ready' (directlyBlocked, otherBlocked) = partition (\ x -> elem x (reachable isDep thisReady)) blocked in ReadyTarget { ready = ofVertex thisReady , waiting = List.map ofVertex directlyBlocked@@ -215,6 +215,7 @@ sccCycles t = mapMaybe addBackEdge (treePaths t) addBackEdge :: [Vertex] -> Maybe [Edge]+ addBackEdge [] = Nothing addBackEdge path@(root : _) = let back = (last path, root) in if elem back (edges g) then Just (pathEdges (path ++ [root])) else Nothing
src/Debian/Relation.hs view
@@ -13,6 +13,7 @@ , ArchOS(..) , ArchCPU(..) , VersionReq(..)+ , RestrictionList -- * Helper Functions , checkVersionReq -- * Relation Parser@@ -21,5 +22,5 @@ ) where import Debian.Arch (Arch(..), ArchOS(..), ArchCPU(..))-import Debian.Relation.Common (SrcPkgName(..), BinPkgName(..), PkgName(pkgNameFromString))+import Debian.Relation.Common (SrcPkgName(..), BinPkgName(..), PkgName(pkgNameFromString), RestrictionList) import Debian.Relation.String