packages feed

fedora-dists 1.0.0.1 → 1.0.0.2

raw patch · 3 files changed

+22/−3 lines, 3 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -3,6 +3,11 @@ `fedora-dists` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. +1.0.0.2+=======+* add haddock strings+* base >= 4.6 (ghc-7.6)+ 1.0.0 ===== 
FedoraDists.hs view
@@ -40,7 +40,11 @@ import Data.Traversable (traverse) #endif -data Dist = Fedora Int | EPEL Int | RHEL Version+-- | The `Dist` datatype specifies the target OS and version.+-- (roughly corresponds to a git branch)+data Dist = Fedora Int -- ^ Fedora release+          | EPEL Int -- ^ EPEL release+          | RHEL Version -- ^ RHEL version   deriving (Eq)  instance Show Dist where@@ -48,6 +52,7 @@   show (EPEL n) = (if n <= 6 then "el" else "epel") ++ show n   show (RHEL v) = "rhel-" ++ show v +-- | Read from eg "f29", "epel7" instance Read Dist where   readPrec = choice [pFedora, pEPEL, pRHEL] where     pChar c = do@@ -61,37 +66,46 @@    readListPrec = readListPrecDefault +-- | Current maintained distribution releases. dists :: [Dist] dists = [rawhide, Fedora 29, Fedora 28, EPEL 7] +-- | The Fedora release number corresponding to current Rawhide rawhideRelease :: Int rawhideRelease = 30 +-- | The Fedora release corresponding to Rawhide rawhide :: Dist rawhide = Fedora rawhideRelease +-- | Used for Koji sidetag when needed. sidetag :: Dist -> Maybe String --sidetag (Fedora n) | n == rawhideRelease = Just "ghc" sidetag _ = Nothing +-- | The Fedora release being tracked in Hackage Distro data (`rawhideRelease` - 1) hackageRelease :: Dist hackageRelease = Fedora (rawhideRelease - 1) +-- | Maps `Dist` to package distgit branch distBranch :: Dist -> String distBranch (Fedora n) | n >= rawhideRelease = "master" distBranch d = show d +-- | Map `Dist` to DNF/YUM repo name distRepo :: Dist -> String distRepo (Fedora n) | n >= rawhideRelease = "rawhide"                     | otherwise = "fedora" distRepo (EPEL _) = "epel" distRepo (RHEL _) = "rhel" +-- | Map `Dist` to Maybe the DNF/YUM updates repo name distUpdates :: Dist -> Maybe String distUpdates (Fedora n) | n >= rawhideRelease = Nothing distUpdates (Fedora _) = Just "updates" distUpdates _ = Nothing +-- | Whether dist has overrides in Bodhi distOverride :: Dist -> Bool distOverride d = d `notElem` [rawhide, Fedora 30 , EPEL 8] 
fedora-dists.cabal view
@@ -1,6 +1,6 @@ cabal-version:       1.18 name:                fedora-dists-version:             1.0.0.1+version:             1.0.0.2 synopsis:            Library for Fedora distribution versions description:             This library provides the Dist datatype and various associated@@ -26,7 +26,7 @@ library   exposed-modules:     FedoraDists -  build-depends:       base < 5+  build-depends:       base >= 4.6 && < 5    ghc-options:         -Wall                        -fwarn-missing-signatures