packages feed

aura 2.0.2 → 2.0.3

raw patch · 33 files changed

+103/−59 lines, 33 filesdep ~aurdep ~fused-effectsdep ~generic-lens

Dependency ranges changed: aur, fused-effects, generic-lens, optparse-applicative, pretty-simple, prettyprinter, time

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Aura Changelog +## 2.0.3++- Updated Spanish translations. Thanks to Max Ferrer!+- Fixed bug #543. Thanks to Alexey Kotlyarov!+ ## 2.0.2  - Bug fixes and performance improvements.
aura.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.2 name:               aura-version:            2.0.2+version:            2.0.3 synopsis:   A secure package manager for Arch Linux and the AUR, written in Haskell. @@ -46,10 +46,10 @@ common libexec   build-depends:     , errors                       ^>=2.3-    , fused-effects                >=0.4 && <0.6+    , fused-effects                >=0.4 && <1.1     , http-client                  >=0.5 && <0.7     , nonempty-containers          ^>=0.3-    , prettyprinter                ^>=1.2+    , prettyprinter                >=1.2 && < 1.6     , prettyprinter-ansi-terminal  ^>=1.1     , transformers                 ^>=0.5     , typed-process                ^>=0.2@@ -91,11 +91,11 @@     , aeson             >=1.2  && <1.5     , aeson-pretty      ^>=0.8     , algebraic-graphs  >=0.1  && <0.5-    , aur               ^>=6.2+    , aur               ^>=6.3     , compactable       ^>=0.1     , directory         ^>=1.3     , filepath          ^>=1.4-    , generic-lens      ^>=1.1+    , generic-lens      >=1.1 && < 1.3     , http-types        >=0.9  && <0.13     , language-bash     ^>=0.8     , megaparsec        ^>=7@@ -106,7 +106,7 @@     , semigroupoids     >=5.2  && <5.4     , stm               ^>=2.5     , these             ^>=1.0-    , time              ^>=1.8+    , time              >=1.8 && < 1.10     , unliftio          ^>=0.2  executable aura@@ -121,8 +121,8 @@   build-depends:     , aura     , http-client-tls       ^>=0.3-    , optparse-applicative  ^>=0.14-    , pretty-simple         >=2.1  && <2.3+    , optparse-applicative  >=0.14 && < 0.16+    , pretty-simple         >=2.1  && <3.3  test-suite aura-test   import:         commons
doc/aura.8 view
@@ -390,6 +390,10 @@ .P (  Spanish   ) Alejandro Gómez .P+(  Spanish   ) Sergio Conde+.P+(  Spanish   ) Max Ferrer+.P ( Portuguese ) Henry "Ingvij" Kupty .P ( Portuguese ) Thiago "thiagowfx" Perrotta
exec/Settings.hs view
@@ -1,6 +1,6 @@ {- -Copyright 2012 - 2019 Colin Woodbury <colin@fosskers.ca>+Copyright 2012 - 2020 Colin Woodbury <colin@fosskers.ca>  This file is part of Aura. 
exec/aura.hs view
@@ -6,7 +6,7 @@  {- -Copyright 2012 - 2019 Colin Woodbury <colin@fosskers.ca>+Copyright 2012 - 2020 Colin Woodbury <colin@fosskers.ca>  This file is part of Aura. @@ -72,7 +72,7 @@ ---  auraVersion :: T.Text-auraVersion = "2.0.2"+auraVersion = "2.0.3"  main :: IO () main = do
lib/Aura/Build.hs view
@@ -6,7 +6,7 @@  -- | -- Module    : Aura.Build--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Cache.hs view
@@ -5,7 +5,7 @@  -- | -- Module    : Aura.Cache--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Colour.hs view
@@ -1,6 +1,6 @@ -- | -- Module    : Aura.Colour--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Commands/A.hs view
@@ -9,7 +9,7 @@  -- | -- Module    : Aura.Commands.A--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --@@ -37,11 +37,11 @@ import           Aura.Types import           Aura.Utils import           BasePrelude hiding ((<+>))-import           Control.Error.Util (hush) import           Control.Effect (Carrier, Member) import           Control.Effect.Error (Error) import           Control.Effect.Lift (Lift, sendM) import           Control.Effect.Reader (Reader, asks)+import           Control.Error.Util (hush) import           Data.Aeson.Encode.Pretty (encodePrettyToTextBuilder) import           Data.Generics.Product (field) import qualified Data.List.NonEmpty as NEL@@ -74,7 +74,7 @@ foreigns ss = S.filter (notIgnored . view (field @"name")) <$> foreignPackages   where notIgnored p = not . S.member p $ ignoresOf ss -upgrade :: (Carrier sig m, Member (Reader Env) sig, Member (Error Failure) sig, Member (Lift IO) sig) => +upgrade :: (Carrier sig m, Member (Reader Env) sig, Member (Error Failure) sig, Member (Lift IO) sig) =>   S.Set PkgName -> NESet SimplePkg -> m () upgrade pkgs fs = do   ss        <- asks settings@@ -92,7 +92,7 @@              sendM . unless (switch ss DryRun) $ saveState ss              traverse_ I.install . NES.nonEmptySet $ S.fromList names <> pkgs <> devel -possibleUpdates :: (Carrier sig m, Member (Reader Env) sig, Member (Error Failure) sig, Member (Lift IO) sig) => +possibleUpdates :: (Carrier sig m, Member (Reader Env) sig, Member (Error Failure) sig, Member (Lift IO) sig) =>   NESet SimplePkg -> m [(AurInfo, Versioning)] possibleUpdates (NES.toList -> pkgs) = do   aurInfos <- aurInfo $ fmap (^. field @"name") pkgs
lib/Aura/Commands/B.hs view
@@ -6,7 +6,7 @@  -- | -- Module    : Aura.Commands.B--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Commands/C.hs view
@@ -8,7 +8,7 @@  -- | -- Module    : Aura.Commands.C--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Commands/L.hs view
@@ -7,7 +7,7 @@  -- | -- Module    : Aura.Commands.L--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Commands/O.hs view
@@ -6,7 +6,7 @@  -- | -- Module    : Aura.Commands.O--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --@@ -20,8 +20,8 @@ import           BasePrelude import           Control.Effect (Carrier, Member) import           Control.Effect.Error (Error)-import           Control.Effect.Reader (Reader) import           Control.Effect.Lift (Lift, sendM)+import           Control.Effect.Reader (Reader) import           Data.Generics.Product (field) import           Data.Set.NonEmpty (NESet) import qualified Data.Text.IO as T
lib/Aura/Core.hs view
@@ -8,7 +8,7 @@  -- | -- Module    : Aura.Core--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Dependencies.hs view
@@ -11,7 +11,7 @@  -- | -- Module    : Aura.Dependencies--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Diff.hs view
@@ -1,6 +1,6 @@ -- | -- Module    : Aura.Diff--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Install.hs view
@@ -9,7 +9,7 @@  -- | -- Module    : Aura.Install--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Languages.hs view
@@ -8,7 +8,7 @@  -- | -- Module    : Aura.Languages.Fields--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --@@ -20,7 +20,7 @@ Denis Kasak / "stranac"                       | Croatian Fredrik Haikarainen / Daniel Beecham          | Swedish Lukas Niederbremer / Jonas Platte             | German-Alejandro Gómez / Sergio Conde                | Spanish+Alejandro Gómez / Sergio Conde / Max Ferrer   | Spanish Henry Kupty / Thiago Perrotta / Wagner Amaral | Portuguese Ma Jiehong / Fabien Dubosson                  | French Kyrylo Silin                                  | Russian@@ -54,7 +54,7 @@     , (Croatian,   "Denis Kasak / \"stranac\"")     , (Swedish,    "Fredrik Haikarainen / Daniel Beecham")     , (German,     "Lukas Niederbremer / Jonas Platte")-    , (Spanish,    "Alejandro Gómez / Sergio Conde")+    , (Spanish,    "Alejandro Gómez / Sergio Conde / Max Ferrer")     , (Portuguese, "Henry Kupty / Thiago Perrotta / Wagner Amaral")     , (French,     "Ma Jiehong / Fabien Dubosson")     , (Russian,    "Kyrylo Silin / Alexey Kotlyarov")@@ -271,6 +271,7 @@ buildFail_8 :: Language -> Doc AnsiStyle buildFail_8 = \case     Japanese   -> "makepkgは失敗しました。"+    Spanish    -> "Ocurrió un error al ejecutar makepkg"     Portuguese -> "Ocorreu um erro ao executar makepkg"     Russian    -> "Произошла ошибка makepkg."     Esperanto  -> "Paneo de makepkg okazis."@@ -278,17 +279,20 @@  buildFail_9 :: Language -> Doc AnsiStyle buildFail_9 = \case+  Spanish   -> "Error al detectar todos los archivo de paquete (*.pkg.tar.xz)."   Esperanto -> "Paneis detekti ĉiujn dosierojn de pakaĵoj (*.pkg.tar.xz)."   _         -> "Failed to detect any built package files (*.pkg.tar.xz)."  buildFail_10 :: Language -> Doc AnsiStyle buildFail_10 = \case+  Spanish   -> "Los paquetes no se pudieron construir."   Esperanto -> "Ĉiuj pakaĵoj paneis munti."   _         -> "Every package failed to build."  buildFail_11 :: Language -> Doc AnsiStyle buildFail_11 = \case   Japanese   -> "作成は失敗しました。エラーを見ますか?"+  Spanish    -> "Construcción fallida. ¿Te gustaría ver el error?"   Esperanto  -> "Muntado paneis. Ĉu vi volas vidi la eraron?"   _          -> "Building failed. Would you like to see the error?" @@ -341,22 +345,26 @@ depError _ (VerConflict s) = s depError _ (Ignored s)     = s depError l (NonExistant (PkgName s)) = case l of+  Spanish    -> "La dependencia " <> bt s <> " no pudo ser encontrada."   Portuguese -> "A dependência " <> bt s <> " não foi encontrada."   Russian    -> "Зависимость " <> bt s <> " не найдена."   Esperanto  -> "La dependeco " <> bt s <> " ne povis troviĝi."   _          -> "The dependency " <> bt s <> " couldn't be found." depError l (BrokenProvides (PkgName pkg) (Provides (PkgName pro)) (PkgName n)) = case l of+  Spanish    -> "El paquete " <> bt pkg <> " necesita " <> bt n <> " que proporciona " <> bt pro <> "."   Russian    -> "Пакету " <> bt pkg <> " требуется " <> bt n <> ", предоставляющий " <> bt pro <> "."   Esperanto  -> "La pakaĵo, " <> bt pkg <> " bezonas " <> bt n <> ", kiu donas " <> bt pro <> "."   _          -> "The package " <> bt pkg <> " needs " <> bt n <> ", which provides " <> bt pro <> "."  missingPkg_3 :: Language -> Doc AnsiStyle missingPkg_3 = \case+  Spanish    -> "Se produjo un error al reorganizar el gráfico de dependencia. Si ves esto, algo está muy mal."   Esperanto  -> "Eraro okazis kiam reorganizi la grafeo de dependeco. Io estas erarega."   _          -> "There was an error reorganizing the dependency graph. If you see this, something is very wrong."  missingPkg_4 :: [NonEmpty PkgName] -> Language -> Doc AnsiStyle missingPkg_4 pns = \case+  Spanish    -> vsep $ "Se detectaron los siguientes ciclos de dependencia:" : pns'   _ -> vsep $ "The following dependency cycles were detected:" : pns'   where pns' = map (hsep . map pretty . intersperse "=>" . map (view (field @"name")) . toList) pns @@ -683,6 +691,7 @@  reportBadDowngradePkgs_2 :: PkgName -> Language -> Doc AnsiStyle reportBadDowngradePkgs_2 (PkgName p) = \case+  Spanish     -> pretty p <+> "no tiene una versión en la caché."   _ -> pretty p <+> "has no version in the cache."  upgradeAURPkgs_1 :: Language -> Doc AnsiStyle@@ -807,6 +816,7 @@ cleanStates_4 :: Int -> Language -> Doc AnsiStyle cleanStates_4 n = \case   Japanese  -> "現在のパッケージ状態記録:" <> pretty n <> "個。"+  Spanish   -> "Actualmente tiene " <+> pretty n <+> "estados de paquetes guardados."   Russian   -> "У вас сейчас " <+> pretty n <+> pluralRussian " сохраненное состояние пакета" " сохраненных состояний пакета" " сохраненных состояний пакетов." n   Esperanto -> "Vi havas " <+> pretty n <+> " konservajn statojn de pakaĵoj."   _         -> "You currently have" <+> pretty n <+> "saved package states."@@ -814,16 +824,19 @@ cleanStates_5 :: T.Text -> Language -> Doc AnsiStyle cleanStates_5 t = \case   Japanese  -> "一番最近に保存されたのは:" <> pretty t+  Spanish   -> "Guardado recientemente:" <+> pretty t   Russian   -> "Последнее сохраненное:" <+> pretty t   Esperanto -> "Lastaj konservaj:" <+> pretty t   _         -> "Mostly recently saved:" <+> pretty t  cleanStates_6 :: Int -> Language -> Doc AnsiStyle cleanStates_6 n = \case+  Spanish   -> pretty n <+> "de estos están anclados y no se eliminarán."   _ -> pretty n <+> "of these are pinned, and won't be removed."  readState_1 :: Language -> Doc AnsiStyle readState_1 = \case+    Spanish    -> "Ese archivo de estado no se pudo analizar. ¿Es un archivo JSON válido?"     Portuguese -> "O arquivo de estado não pôde ser interpretado. É um arquivo JSON válido?"     Russian    -> "Это состояние не распознано. Это корректный JSON?"     Esperanto  -> "Tiu statdosiero paneis sintake analizi. Ĉu ĝi estas valida JSON?"@@ -1152,6 +1165,7 @@ -- https://github.com/aurapm/aura/issues/498 connectionFailure_1 :: Language -> Doc AnsiStyle connectionFailure_1 = \case+  Spanish   -> "No se pudo contactar con el AUR. ¿Tienes conexión a internet?"   _ -> "Failed to contact the AUR. Do you have an internet connection?"  infoFields :: Language -> [T.Text]@@ -1271,6 +1285,7 @@ restoreState_2 :: Language -> Doc AnsiStyle restoreState_2 = \case     Japanese   -> "保存されたパッケージ状態がない。作るには「-B」を。"+    Spanish    -> "No hay estados guardados para ser restaurados. (Utilice -B para guardar el estado actual)"     Portuguese -> "Nenhum estado disponível para ser recuperado. (Utilize -B para salvar o estado atual)"     Russian    -> "Нет сохраненных состояний для восстановления. (Используйте -B для сохранения текущего состояния)"     Chinese    -> "没有要恢复的已保存状态。(使用 -B 保存当前状态)"@@ -1303,6 +1318,7 @@ -------------------------------------- whoIsBuildUser_1 :: Language -> Doc AnsiStyle whoIsBuildUser_1 = \case+    Spanish    -> "No se puede determinar el usuario que ejecutará la compilación."     Portuguese -> "Não foi possível determinal o usuário que executará a compilação."     Russian    -> "Не удается определить, от имени какого пользователя производить сборку."     Esperanto  -> "Ne povas decidi, per kiu konto de uzanto munti."@@ -1333,14 +1349,16 @@  confParsing_1 :: Language -> Doc AnsiStyle confParsing_1 = \case+    Spanish    -> "No fue posible analizar su archivo pacman.conf."     Portuguese -> "Não foi possível interpretar o arquivo pacman.conf ."     Russian    -> "Не удается распознать формат вашего файла pacman.conf."     Esperanto  -> "Ne kapablas sintaske analizi vian dosieron, pacman.conf."     _          -> "Unable to parse your pacman.conf file." -provides_1 :: PkgName -> Doc AnsiStyle-provides_1 (bt . view (field @"name") -> pro) =-  pro <+> "is required as a dependency, which is provided by multiple packages. Please select one:"+provides_1 :: PkgName -> Language -> Doc AnsiStyle+provides_1 (bt . view (field @"name") -> pro) = \case+    Spanish    -> pro <+> "se requiere como una dependencia, que es proporcionada por múltiples paquetes. Por favor, seleccione uno:"+    _          -> pro <+> "is required as a dependency, which is provided by multiple packages. Please select one:"  ---------------------------------- -- Aura/Pkgbuild/Editing functions@@ -1387,42 +1405,52 @@ ------------------------------ security_1 :: PkgName -> Language -> Doc AnsiStyle security_1 (PkgName p) = \case+  Spanish   -> "El PKGBUILD de" <+> bt p <+> "era demasiado complejo de analizar - puede estar ofuscando código malicioso."   _ -> "The PKGBUILD of" <+> bt p <+> "was too complex to parse - it may be obfuscating malicious code."  security_2 :: T.Text -> Language -> Doc AnsiStyle security_2 (bt -> t) = \case+  Spanish   -> t <+> "se puede usar para descargar scripts arbitrarios que este PKGBUILD no rastrea."   _ -> t <+> "can be used to download arbitrary scripts that aren't tracked by this PKGBUILD."  security_3 :: T.Text -> Language -> Doc AnsiStyle security_3 (bt -> t) = \case+  Spanish   -> t <+> "se puede usar para ejecutar código arbitrario que este PKGBUILD no rastrea."   _ -> t <+> "can be used to execute arbitrary code not tracked by this PKGBUILD."  security_4 :: T.Text -> Language -> Doc AnsiStyle security_4 (bt -> t) = \case+  Spanish   -> t <+> "indica que alguien puede estar intentando obtener acceso de root a su máquina."   _ -> t <+> "indicates that someone may be trying to gain root access to your machine."  security_5 :: PkgName -> Language -> Doc AnsiStyle security_5 (PkgName p) = \case+  Spanish   -> "ADVERTENCIA: El PKGBUILD de" <+> bt p <+> "contiene expresiones bash en la lista negra."   _ -> "WARNING: The PKGBUILD of" <+> bt p <+> "contains blacklisted bash expressions."  security_6 :: Language -> Doc AnsiStyle security_6 = \case+  Spanish   -> "¿Desea salir del proceso de compilación?"   _ -> "Do you wish to quit the build process?"  security_7 :: Language -> Doc AnsiStyle security_7 = \case+  Spanish   -> "Se canceló el procesamiento posterior para evitar el código bash potencialmente malicioso."   _ -> "Cancelled further processing to avoid potentially malicious bash code."  security_8 :: T.Text -> Language -> Doc AnsiStyle security_8 (bt -> t) = \case+  Spanish   -> t <+> "es un comando bash integrado en los campos de la matriz del PKGBUILD."   _ -> t <+> "is a bash command inlined in your PKGBUILD array fields."  security_9 :: T.Text -> Language -> Doc AnsiStyle security_9 (bt -> t) = \case+  Spanish   -> t <+> "es algo extraño para tener en sus campos de matriz. ¿Es seguro?"   _ -> t <+> "is a strange thing to have in your array fields. Is it safe?"  security_10 :: T.Text -> Language -> Doc AnsiStyle security_10 (bt -> t) = \case+  Spanish   -> t <+> "implica que alguien estaba tratando de ser astuto con las variables para ocultar comandos maliciosos."   _ -> t <+> "implies that someone was trying to be clever with variables to hide malicious commands."  -----------------------@@ -1443,7 +1471,7 @@     _          -> "[Y/n]"  yesPattern :: Language -> [T.Text]-yesPattern = \case+yesPattern lang = map T.toCaseFold $ case lang of     Polish     -> ["t", "tak"]     Croatian   -> ["d", "da"]     German     -> ["j", "ja"]
lib/Aura/Languages/Fields.hs view
@@ -5,7 +5,7 @@  -- | -- Module    : Aura.Languages.Fields--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --@@ -273,6 +273,7 @@ popularity :: Language -> T.Text popularity = \case     Japanese   -> "人気"+    Spanish    -> "Popularidad"     Portuguese -> "Popularidade"     Esperanto  -> "Populareco"     _          -> "Popularity"
lib/Aura/Logo.hs view
@@ -2,7 +2,7 @@  -- | -- Module    : Aura.Logo--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/MakePkg.hs view
@@ -3,7 +3,7 @@  -- | -- Module    : Aura.State--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Packages/AUR.hs view
@@ -8,7 +8,7 @@  -- | -- Module    : Aura.Packages.AUR--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --@@ -35,11 +35,11 @@ import           BasePrelude hiding (head) import           Control.Compactable (fmapEither) import           Control.Concurrent.STM.TVar (modifyTVar')-import           Control.Error.Util (hush, note) import           Control.Effect (Carrier, Member) import           Control.Effect.Error (Error) import           Control.Effect.Lift (Lift, sendM) import           Control.Effect.Reader (Reader, asks)+import           Control.Error.Util (hush, note) import           Control.Monad.Trans.Class (lift) import           Control.Monad.Trans.Maybe import           Control.Scheduler (Comp(..), traverseConcurrently)
lib/Aura/Packages/Repository.hs view
@@ -6,7 +6,7 @@  -- | -- Module    : Aura.Packages.Repository--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --@@ -20,7 +20,7 @@ import           Aura.Core import           Aura.Languages (provides_1) import           Aura.Pacman (pacmanLines, pacmanOutput)-import           Aura.Settings (CommonSwitch(..), Settings, shared)+import           Aura.Settings (CommonSwitch(..), Settings(..), shared) import           Aura.Types import           Aura.Utils (getSelection, strictText) import           BasePrelude hiding (try)@@ -92,7 +92,7 @@   traverseConcurrently Par' isInstalled ps >>= maybe f pure . listToMaybe . catMaybes   where     f | shared ss NoConfirm = pure . bool a pn $ pn `elem` ps-      | otherwise = warn ss (provides_1 pn) >> getSelection (^. field @"name") (a :| as)+      | otherwise = warn ss (provides_1 pn $ langOf ss) >> getSelection (^. field @"name") (a :| as)  -- | The most recent version of a package, if it exists in the respositories. mostRecent :: PkgName -> IO (Either PkgName Versioning)
lib/Aura/Pacman.hs view
@@ -6,7 +6,7 @@  -- | -- Module    : Aura.Pacman--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --@@ -36,7 +36,7 @@ import           Aura.Languages import           Aura.Types import           Aura.Utils (strictText)-import           BasePrelude hiding (some, try)+import           BasePrelude hiding (setEnv, some, try) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy.Char8 as BL import qualified Data.Map.Strict as M@@ -127,19 +127,24 @@ ---------- -- ACTIONS ----------++-- | Create a pacman process to run.+pacmanProc :: [String] -> ProcessConfig () () ()+pacmanProc args = setEnv [("LC_ALL", "C")] $ proc "pacman" args+ -- | Run a pacman action that may fail. Will never throw an IO exception. pacman :: [T.Text] -> IO (Either Failure ()) pacman (map T.unpack -> args) = do-  ec <- runProcess $ proc "pacman" args+  ec <- runProcess $ pacmanProc args   pure . bool (Left $ Failure pacmanFailure_1) (Right ()) $ ec == ExitSuccess  -- | Run some `pacman` process, but only care about whether it succeeded. pacmanSuccess :: [T.Text] -> IO Bool-pacmanSuccess = fmap (== ExitSuccess) . runProcess . setStderr closed . setStdout closed . proc "pacman" . map T.unpack+pacmanSuccess = fmap (== ExitSuccess) . runProcess . setStderr closed . setStdout closed . pacmanProc . map T.unpack  -- | Runs pacman silently and returns only the stdout. pacmanOutput :: [T.Text] -> IO BL.ByteString-pacmanOutput = fmap (^. _2) . readProcess . proc "pacman" . map T.unpack+pacmanOutput = fmap (^. _2) . readProcess . pacmanProc . map T.unpack  -- | Runs pacman silently and returns the stdout as UTF8-decoded `Text` lines. pacmanLines :: [T.Text] -> IO [T.Text]
lib/Aura/Pkgbuild/Base.hs view
@@ -2,7 +2,7 @@  -- | -- Module    : Aura.Pkgbuild.Base--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> @@ -14,8 +14,9 @@  import           Aura.Types import qualified Data.Text as T-import           System.Path (Absolute, FileExt(..), Path, fromAbsoluteFilePath,-                              fromUnrootedFilePath, (<.>), (</>))+import           System.Path+    (Absolute, FileExt(..), Path, fromAbsoluteFilePath, fromUnrootedFilePath,+    (<.>), (</>))  --- 
lib/Aura/Pkgbuild/Editing.hs view
@@ -4,7 +4,7 @@  -- | -- Module    : Aura.Pkgbuild.Base--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Pkgbuild/Fetch.hs view
@@ -5,7 +5,7 @@  -- | -- Module    : Aura.State--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Pkgbuild/Records.hs view
@@ -3,7 +3,7 @@  -- | -- Module    : Aura.Pkgbuild.Records--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Pkgbuild/Security.hs view
@@ -5,7 +5,7 @@  -- | -- Module    : Aura.Pkgbuild.Security--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Settings.hs view
@@ -3,7 +3,7 @@  -- | -- Module    : Aura.Settings--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/State.hs view
@@ -6,7 +6,7 @@  -- | -- Module    : Aura.State--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Types.hs view
@@ -13,7 +13,7 @@  -- | -- Module    : Aura.Types--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --
lib/Aura/Utils.hs view
@@ -2,7 +2,7 @@  -- | -- Module    : Aura.Utils--- Copyright : (c) Colin Woodbury, 2012 - 2019+-- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License   : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> --@@ -202,7 +202,7 @@  -- | An empty response emplies "yes". isAffirmative :: Language -> T.Text -> Bool-isAffirmative l t = T.null t || elem t (yesPattern l)+isAffirmative l t = T.null t || elem (T.toCaseFold t) (yesPattern l)  -- | Doesn't prompt when `--noconfirm` is used. optionalPrompt :: Settings -> (Language -> Doc AnsiStyle) -> IO Bool