packages feed

aura 2.0.4 → 2.0.5

raw patch · 7 files changed

+28/−240 lines, 7 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Aura.State: PkgState :: ZonedTime -> Bool -> Map PkgName Versioning -> PkgState
+ Aura.State: PkgState :: !ZonedTime -> !Bool -> !Map PkgName Versioning -> PkgState
- Aura.State: [pinnedOf] :: PkgState -> Bool
+ Aura.State: [pinnedOf] :: PkgState -> !Bool
- Aura.State: [pkgsOf] :: PkgState -> Map PkgName Versioning
+ Aura.State: [pkgsOf] :: PkgState -> !Map PkgName Versioning
- Aura.State: [timeOf] :: PkgState -> ZonedTime
+ Aura.State: [timeOf] :: PkgState -> !ZonedTime

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Aura Changelog +## 2.0.5 (2020-02-16)++- Fixed a bug that prevented `-Syuu` and `-Scc`.+ ## 2.0.4 (2020-02-08)  - Removed `fused-effects` dependency in favour of `rio` to simplify code.
README.md view
@@ -1,230 +1,4 @@-[![Build Status](https://travis-ci.org/aurapm/aura.svg?branch=master)](https://travis-ci.org/aurapm/aura)-[![Join the chat at https://gitter.im/aurapm/aura](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aurapm/aura?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)--# What is Aura?-Aura is a package manager for Arch Linux. It's main purpose is as an-"AUR helper", in that it automates the process of installating packages-from the Arch User Repositories. It is, however, capable of much more.--# The Aura Philosophy--### Aura is Pacman-  Aura doesn't just mimic pacman... it _is_ pacman.-  All pacman operations and their sub-options are allowed.-  Some even hold special meaning in Aura as well.--### Arch is Arch. AUR is AUR.-  `-S` yields pacman packages and _only_ pacman packages. This agrees with-  the above. Thus in Aura, the `-A` operation is introduced for obtaining-  AUR packages. `-A` comes with sub-options you're used to (`-u`, `-s`,-  `-i`, etc.).--### All together-Dependencies and packages are not built and installed one at a time.-Install order is as follows:-1. All pacman dependencies (all at once).-2. All AUR dependencies (one at a time).-3. All AUR packages (all at once).--### Quiet Building-  By default `makepkg` output is suppressed. If you want the people-  behind you to think you're a badass hacker, then this suppression-  can be disabled by using `-x` alongside `-A`.--### Run as Root, Build as a User-  `makepkg` gets very upset if you try to build a package as root.-  That said, a built package can't be handed off to pacman and installed-  if you _don't_ run as root. Other AUR helpers ignore this problem,-  but Aura does not. Even when run with `sudo`, packages are built-  with normal user privileges, then handed to pacman and installed as root.--### Know your System-  Editing PKGBUILDs mid-build is not default behaviour.-  An Arch user should know _exactly_ what they're putting into their system,-  thus research into prospective packages should be done beforehand.-  However, for functionality's sake, the option `--hotedit` used with `-A`-  will prompt the user for PKGBUILD editing. Regardless, as a responsible-  user you must know what you are building.--### Downgradibility-  Built AUR package files are moved to the package cache.-  This allows for them to be easily downgraded when problems arise.-  Other top AUR helper programs do not do this.-  The option `-B` will save a package state, and `-Br` will restore-  a state you select. `-Au` also automatically invokes a save,-  to help you roll back from problematic updates.--### No Orphans-  Sometimes dependencies lose their *required* status, but remain-  installed on your system. Sometimes AUR package "makedepends"-  aren't required at all after install. Packages like this just-  sit there, receiving upgrades for no reason.-  Aura helps keep track of and remove packages like this.-  Learn more [here](#working-with-orphan-packages).--### Arch Linux for Everyone-  English is well established as the world's Lingua Franca, and is also-  the dominant language of computing and the internet. That said, it's-  natural that some people are going to be more comfortable working-  in their native language. From the beginning Aura has been built with-  multiple-language support in mind, making it very easy to add new ones.--### Haskell-  Aura is written in Haskell, which means easy development and pretty code.-  Please feel free to use it as a simple Haskell reference.-  Aura code demonstrates:-  * Parser Combinators (`megaparsec`)-  * CLI Flag Handling (`optparse-applicative`)-  * Extensible Effects (`fused-effects`)-  * Concurrency (`async`)-  * Shell Interaction (`shelly`)--# Installation--## Arch Linux--It is recommended to install the prebuilt binary of Aura:--```bash-git clone https://aur.archlinux.org/aura-bin.git-cd aura-bin-makepkg-sudo pacman -U <the-package-file-that-makepkg-produces>-```--## Manual--You will need the [stack tool](https://docs.haskellstack.org/en/stable/README/) for Haskell-to compile Aura yourself. Then:--```bash-git clone https://github.com/aurapm/aura.git-cd aura-stack install -- aura-```--This may take a while to initially build all of Aura's dependencies. Once complete,-your `aura` binary will be available in `~/.local/bin/`.--Sample Usage-============--#### Installing Packages-Install an AUR package:--    aura -A (package)--Author's favourite (upgrades, removes make deps, shows PKGBUILD diffs):--    aura -Akuax--Just upgrade all installed AUR packages:--    aura -Au--Look up information on an AUR package:--    aura -Ai (package)--Search the AUR via a regex:--    aura -As (regex)--Display an AUR package's PKGBUILD:--    aura -Ap (package)--Display an AUR package's dependencies (and those deps' deps too):--    aura -Ad (package)--Install with makepkg output unsuppressed:--    aura -Ax (package)--Install and remove make dependencies afterwards:--    aura -Aa (package)--Install and show PKGBUILD differences:--    aura -Ak (package)--#### Working with Package Records-Store a record of all installed packages:--    aura -B--Restore a saved record. Rolls back, uninstalls, and reinstalls packages as necessary:--    aura -Br--#### Working with the Package Cache-Downgrade a package (this is interactive):--    aura -C (package)--Search the package cache for package files via a regex:--    aura -Cs (regex)--Backup the package cache:--    aura -Cb (/path/to/backup/location/)--Reduce the package cache to contain only 'x' of each package file:--    aura -Cc x--#### Working with the Pacman Log-View the Pacman Log:--    aura -L--Display install / upgrade history for a package:--    aura -Li (package)--Search the pacman logfile via a regex:--    aura -Ls (regex)--#### Working with Orphan Packages-Display orphan packages:--    aura -O--Adopt an orphan package:--    aura -O --adopt (package)--Uninstall all orphan packages:--    aura -Oj--More information is available in aura's manpage.--# Localisation-As mentioned in the Philosophy above, adding new languages to Aura is-quite easy. If you speak a language other than those available and-would like it added to Aura, please consult **LOCALISATION.md**.--Aura is currently translated by these generous people:+# Aura -| Language   | Translators                                     |-|------------|-------------------------------------------------|-| Chinese    | Kai Zhang                                       |-| Croatian   | Denis Kasak and "stranac"                       |-| Esperanto  | Zachary "Ghosy" Matthews                        |-| French     | Ma Jiehong and Fabien Dubosson                  |-| German     | Lukas Niederbremer and Jonas Platte             |-| Indonesian | "pak tua Greg"                                  |-| Italian    | Bob Valantin                                    |-| Japanese   | Colin Woodbury and Onoue Takuro                 |-| Norwegian  | "chinatsun"                                     |-| Polish     | Chris Warrick                                   |-| Portuguese | Henry Kupty, Thiago Perrotta, and Wagner Amaral |-| Russian    | Kyrylo Silin, Alexey Kotlyarov                  |-| Serbian    | Filip Brcic                                     |-| Spanish    | Alejandro Gómez and Sergio Conde                |-| Swedish    | Fredrik Haikarainen and Daniel Beecham          |+Aura is a package manager for Arch Linux. Visit its main README here:+https://github.com/fosskers/aura
aura.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.2 name:               aura-version:            2.0.4+version:            2.0.5 synopsis:   A secure package manager for Arch Linux and the AUR, written in Haskell. 
exec/Flags.hs view
@@ -40,7 +40,7 @@               | Files    (Set FilesOp)               | Query    (Either QueryOp (Set QueryFilter, Set PkgName))               | Remove   (Set RemoveOp) (NESet PkgName)-              | Sync     (Either SyncOp (Set PkgName)) (Set SyncSwitch)+              | Sync     (Either (NonEmpty SyncOp) (Set PkgName)) (Set SyncSwitch)               | TestDeps (NESet Text)               | Upgrade  (Set UpgradeSwitch) (NESet PkgName)               deriving (Show)@@ -138,7 +138,7 @@             | SyncSearch    Text             | SyncUpgrade  (Set Text)             | SyncDownload (NESet Text)-            deriving (Show)+            deriving (Eq, Ord, Show)  instance Flagable SyncOp where   asFlag SyncClean         = ["--clean"]@@ -423,10 +423,10 @@         unneeded = flag' RemoveUnneeded (long "unneeded" <> short 'u' <> hidden <> help "Remove unneeded packages.")  sync :: Parser PacmanOp-sync = bigS *> (Sync <$> (fmap (Right . S.map PkgName) manyArgs <|> fmap Left mods) <*> (S.fromList <$> many (ref <|> ign <|> igg)))+sync = bigS *> (Sync <$> (fmap Left mods <|> fmap (Right . S.map PkgName) manyArgs) <*> (S.fromList <$> many (ref <|> ign <|> igg)))   where bigS = flag' () (long "sync" <> short 'S' <> help "Install official packages.")         ref  = flag' SyncRefresh (long "refresh" <> short 'y' <> hidden <> help "Update the package database.")-        mods = cln <|> gps <|> inf <|> lst <|> sch <|> upg <|> dnl+        mods = NEL.fromList <$> some (cln <|> gps <|> inf <|> lst <|> sch <|> upg <|> dnl)         cln  = flag' SyncClean (long "clean" <> short 'c' <> hidden <> help "Remove old packages from the cache.")         gps  = SyncGroups <$> (flag' () (long "groups" <> short 'g' <> hidden <> help "View members of a package group.") *> someArgs')         inf  = SyncInfo <$> (flag' () (long "info" <> short 'i' <> hidden <> help "View package information.") *> someArgs')
exec/aura.hs view
@@ -105,7 +105,8 @@         ++ asFlag (commonConfigOf ss)         ++ bool [] ["--quiet"] (switch ss LowVerbosity)   case ops of-    Left o@(Sync (Left (SyncUpgrade _)) _, _) -> sudo (liftIO $ B.saveState ss) *> p o+    Left o@(Sync (Left sops) _, _)+      | any isUpgrade sops -> sudo (liftIO $ B.saveState ss) *> p o     Left o -> p o     Right (AurSync o _) ->       case o of@@ -142,6 +143,10 @@     Right Version   -> liftIO $ versionInfo >>= animateVersionMsg ss auraVersion     Right Languages -> displayOutputLanguages     Right ViewConf  -> viewConfFile++isUpgrade :: SyncOp -> Bool+isUpgrade (SyncUpgrade _) = True+isUpgrade _               = False  displayOutputLanguages :: RIO Env () displayOutputLanguages = do
lib/Aura/State.hs view
@@ -54,9 +54,9 @@ -- | All packages installed at some specific `ZonedTime`. Any "pinned" PkgState will -- never be deleted by `-Bc`. data PkgState = PkgState-  { timeOf   :: ZonedTime-  , pinnedOf :: Bool-  , pkgsOf   :: Map PkgName Versioning }+  { timeOf   :: !ZonedTime+  , pinnedOf :: !Bool+  , pkgsOf   :: !(Map PkgName Versioning) }  instance ToJSON PkgState where   toJSON (PkgState t pnd ps) = object@@ -71,7 +71,9 @@     <*> fmap f (v .: "packages")     where f = fmapMaybe (hush . versioning) -data StateDiff = StateDiff { _toAlter :: [SimplePkg], _toRemove :: [PkgName] }+data StateDiff = StateDiff+  { _toAlter  :: ![SimplePkg]+  , _toRemove :: ![PkgName] }  -- | The default location of all saved states: \/var\/cache\/aura\/states stateCache :: Path Absolute
lib/Aura/Types.hs view
@@ -191,7 +191,10 @@ data InstallType = Pacman PkgName | Build Buildable deriving (Eq)  -- | A package name with its version number.-data SimplePkg = SimplePkg { name :: !PkgName, version :: !Versioning } deriving (Eq, Ord, Show, Generic)+data SimplePkg = SimplePkg+  { name    :: !PkgName+  , version :: !Versioning }+  deriving (Eq, Ord, Show, Generic)  -- | Attempt to create a `SimplePkg` from filepaths like --   @\/var\/cache\/pacman\/pkg\/linux-3.2.14-1-x86_64.pkg.tar.xz@