Copyright | (c) Colin Woodbury 2012 - 2020 |
---|---|
License | GPL3 |
Maintainer | Colin Woodbury <colin@fosskers.ca> |
Safe Haskell | None |
Language | Haskell2010 |
An interface to pacman
.
Takes any pacman arguments and applies it to pacman through the shell.
Synopsis
- pacman :: [Text] -> IO ()
- pacmanOutput :: [Text] -> IO ByteString
- pacmanSuccess :: [Text] -> IO Bool
- pacmanLines :: [Text] -> IO [Text]
- lockFile :: FilePath
- pacmanConfFile :: FilePath
- defaultLogFile :: FilePath
- getCachePath :: Config -> Maybe FilePath
- getLogFilePath :: Config -> Maybe FilePath
- getPacmanConf :: FilePath -> IO (Either Failure Config)
- getIgnoredPkgs :: Config -> Set PkgName
- getIgnoredGroups :: Config -> Set PkgGroup
- groupPackages :: NonEmpty PkgGroup -> IO (Set PkgName)
- versionInfo :: IO [Text]
- verMsgPad :: Int
Calling Pacman
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
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.