aura-3.1.1: A secure package manager for Arch Linux and the AUR.

Copyright(c) Colin Woodbury 2012 - 2020
LicenseGPL3
MaintainerColin Woodbury <colin@fosskers.ca>
Safe HaskellNone
LanguageHaskell2010

Aura.Pacman

Contents

Description

An interface to pacman. Takes any pacman arguments and applies it to pacman through the shell.

Synopsis

Calling Pacman

pacman :: [Text] -> IO () Source #

Run a pacman action that may fail.

pacmanOutput :: [Text] -> IO ByteString Source #

Runs pacman silently and returns only the stdout.

pacmanSuccess :: [Text] -> IO Bool Source #

Run some pacman process, but only care about whether it succeeded.

pacmanLines :: [Text] -> IO [Text] Source #

Runs pacman silently and returns the stdout as UTF8-decoded Text lines.

Paths

lockFile :: FilePath Source #

Default location of the pacman database lock file: /var/lib/pacman/db.lck

pacmanConfFile :: FilePath Source #

Default location of the pacman config file: /etc/pacman.conf

defaultLogFile :: FilePath Source #

Default location of the pacman log flie: /var/log/pacman.log

getCachePath :: Config -> Maybe FilePath Source #

Fetches the CacheDir entry from the config, if it's there.

getLogFilePath :: Config -> Maybe FilePath Source #

Fetches the LogFile entry from the config, if it's there.

Pacman Config

getPacmanConf :: FilePath -> IO (Either Failure Config) Source #

Given a filepath to the pacman config, try to parse its contents.

getIgnoredPkgs :: Config -> Set PkgName Source #

Fetches the IgnorePkg entry from the config, if it's there.

getIgnoredGroups :: Config -> Set PkgGroup Source #

Fetches the IgnoreGroup entry from the config, if it's there.

groupPackages :: NonEmpty PkgGroup -> IO (Set PkgName) Source #

Given a Set of package groups, yield all the packages they contain.

Misc.

versionInfo :: IO [Text] Source #

Yields the lines given by `pacman -V` with the pacman image stripped.

verMsgPad :: Int Source #

The amount of whitespace before text in the lines given by `pacman -V`