aura 3.2.0 → 3.2.1
raw patch · 3 files changed
+10/−9 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +1/−1
- aura.cabal +1/−1
- exec/Aura/Commands/A.hs +8/−7
CHANGELOG.md view
@@ -1,6 +1,6 @@ # Aura Changelog -## 3.2.0 (2020-10-27)+## 3.2.1 (2020-10-27) With this release, Aura has passed 2,000 commits. Thank you for your ongoing support!
aura.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: aura-version: 3.2.0+version: 3.2.1 synopsis: A secure package manager for Arch Linux and the AUR. description: Aura is a package manager for Arch Linux. It connects to both the
exec/Aura/Commands/A.hs view
@@ -1,6 +1,7 @@-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE TupleSections #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Aura.Commands.A@@ -46,6 +47,7 @@ import qualified RIO.HashSet as HS import qualified RIO.List as L import RIO.List.Partial (maximum)+import qualified RIO.Map as M import qualified RIO.NonEmpty as NEL import qualified RIO.Set as S import qualified RIO.Text as T@@ -93,11 +95,10 @@ possibleUpdates :: NonEmpty SimplePkg -> RIO Env [(AurInfo, Versioning)] possibleUpdates pkgs = do- aurInfos <- aurInfo $ fmap spName pkgs- let !names = map aurNameOf aurInfos- aurPkgs = NEL.filter (\(SimplePkg (PkgName n) _) -> n `elem` names) pkgs+ aurInfos <- M.fromList . map (\ai -> (aurNameOf ai, ai)) <$> aurInfo (NEL.map spName pkgs)+ let realPkgs = mapMaybe (\(SimplePkg (PkgName n) v) -> (,v) <$> M.lookup n aurInfos) $ NEL.toList pkgs logDebug "Package lookup successful."- pure . filter isntMostRecent . zip aurInfos $ map spVersion aurPkgs+ pure $ filter isntMostRecent realPkgs -- | Is there an update for Aura that we could apply first? auraCheck :: [PkgName] -> RIO Env (Maybe PkgName)