packages feed

fedora-releases 0.2.1 → 0.3.0

raw patch · 4 files changed

+26/−6 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Distribution.Fedora.Branch: EPELMinor :: !Natural -> !Natural -> Branch
+ Distribution.Fedora.Release: [releaseEOL] :: Release -> Maybe String
- Distribution.Fedora.Branch: EPEL :: !Int -> Branch
+ Distribution.Fedora.Branch: EPEL :: !Natural -> Branch
- Distribution.Fedora.Branch: EPELNext :: !Int -> Branch
+ Distribution.Fedora.Branch: EPELNext :: !Natural -> Branch
- Distribution.Fedora.Branch: Fedora :: !Int -> Branch
+ Distribution.Fedora.Branch: Fedora :: !Natural -> Branch
- Distribution.Fedora.Release: Release :: String -> String -> String -> String -> Bool -> String -> String -> Maybe String -> String -> Bool -> Maybe String -> String -> Release
+ Distribution.Fedora.Release: Release :: String -> String -> String -> String -> Bool -> String -> String -> Maybe String -> String -> Bool -> Maybe String -> String -> Maybe String -> Release

Files

CHANGELOG.md view
@@ -2,6 +2,10 @@  `fedora-releases` uses [PVP Versioning](https://pvp.haskell.org). +## 0.3.0 (2025-06-04)+- Branch: add epel10.x minor branches+- Release: include eol field+ ## 0.2.1 (2025-02-07) - Release: add getRawhideVersion and getCurrentFedoraVersion - eitherBranch: fix misparse (read error) of "epel/" as branch
fedora-releases.cabal view
@@ -1,6 +1,6 @@ cabal-version:       1.18 name:                fedora-releases-version:             0.2.1+version:             0.3.0 synopsis:            Library for Fedora release versions description:             This library provides the Branch and Release data types@@ -21,8 +21,8 @@                      CHANGELOG.md tested-with:         GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4,                      GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2,-                     GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.6, GHC == 9.8.4,-                     GHC == 9.10.1+                     GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.7, GHC == 9.8.4,+                     GHC == 9.10.2  source-repository head   type:                git
src/Distribution/Fedora/Branch.hs view
@@ -31,6 +31,7 @@ import Data.Maybe (mapMaybe) import Data.Ord (comparing, Down(Down)) import Data.Tuple (swap)+import Numeric.Natural (Natural) import Safe (headDef, readMay)  import Distribution.Fedora.Release@@ -38,7 +39,7 @@ -- | Branch datatype -- -- Branch can be rawhide, or a fedora or epel branch-data Branch = EPEL !Int | EPELNext !Int | Fedora !Int | Rawhide+data Branch = EPELMinor !Natural !Natural | EPEL !Natural | EPELNext !Natural | Fedora !Natural | Rawhide   deriving (Eq)  -- | defined such that: EPELNext 9 < EPEL 10 < Fedora 41 < Rawhide@@ -47,12 +48,21 @@   compare (Fedora m) (Fedora n) = compare m n   compare (EPELNext m) (EPELNext n) = compare m n   compare (EPEL m) (EPEL n) = compare m n+  compare (EPELMinor m1 n1) (EPELMinor m2 n2) =+    case compare m1 m2 of+      LT -> LT+      GT -> GT+      EQ -> compare n1 n2   compare Rawhide _ = GT   compare _ Rawhide = LT   compare (Fedora _) _ = GT   compare _ (Fedora _) = LT   compare (EPEL m) (EPELNext n) = if m == n then LT else compare m n   compare (EPELNext m) (EPEL n) = if m == n then GT else compare m n+  compare (EPEL m) (EPELMinor maj _) = if m >= maj then GT else LT+  compare (EPELMinor maj _) (EPEL n) = if maj <= n then LT else GT+  compare (EPELMinor _ _) (EPELNext _) = GT+  compare (EPELNext _) (EPELMinor _ _) = LT  -- | Read a Fedora Branch name, otherwise return branch string eitherBranch :: String -> Either String Branch@@ -71,6 +81,7 @@               case pre of                    "f" -> Right $ Fedora num                    "epel" -> Right $ EPEL num+                   "epel10." -> Right $ EPELMinor 10 num                    "el" -> Right $ EPEL num                    _ -> Left str @@ -113,6 +124,7 @@ showBranch (Fedora n) = "f" ++ show n showBranch (EPEL n) = (if n <= 6 then "el" else "epel") ++ show n showBranch (EPELNext n) = "epel" ++ show n ++ "-next"+showBranch (EPELMinor m n) = "epel" ++ show m ++ '.' : show n  -- | Get Release associated with release Branch --@@ -137,6 +149,8 @@   return $ '.' : (distroFix br . replace "." "_") dist   where     distroFix (EPEL _) = replace "epel" "el"+    distroFix (EPELNext _) = replace "epel" "el"+    distroFix (EPELMinor _ _) = replace "epel" "el"     distroFix _ = replace "f" "fc"  -- | Returns newer branch than given one from supplied active branches.
src/Distribution/Fedora/Release.hs view
@@ -44,7 +44,8 @@     releaseState :: String,     releaseAutomaticUpdates :: Bool,     releaseTestingRepo :: Maybe String,-    releaseTestingTag :: String+    releaseTestingTag :: String,+    releaseEOL :: Maybe String   } deriving (Show,Eq)  readRelease :: Object -> Maybe Release@@ -62,7 +63,8 @@   automatic <- lookupKey "create_automatic_updates" obj   let testrepo = lookupKey "testing_repository" obj   testtag <- lookupKey "testing_tag" obj-  return $ Release name ver idPref br composed candidate disttag setting state automatic testrepo testtag+  let eol = lookupKey "eol" obj+  return $ Release name ver idPref br composed candidate disttag setting state automatic testrepo testtag eol  -- | ordered by releaseName instance Ord Release where