| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
SelectRPMs
Synopsis
- data Select
- selectDefault :: Select
- selectRpmsOptions :: Parser Select
- installArgs :: String -> Select
- checkSelection :: Monad m => Select -> m ()
- rpmsToNVRAs :: [String] -> [NVRA]
- data Existence
- type ExistNVRA = (Existence, NVRA)
- data Yes
- data ExistingStrategy
- existingStrategyOption :: Parser ExistingStrategy
- decideRPMs :: Yes -> Bool -> Maybe ExistingStrategy -> Select -> String -> [NVRA] -> IO [ExistNVRA]
- nvraToRPM :: NVRA -> FilePath
- groupOnArch :: FilePath -> [ExistNVRA] -> [(FilePath, [ExistNVRA])]
- data PkgMgr
- pkgMgrOpt :: Parser PkgMgr
- installRPMs :: Bool -> Bool -> Maybe PkgMgr -> Yes -> [(FilePath, [ExistNVRA])] -> IO ()
- installRPMsAllowErasing :: Bool -> Bool -> Maybe PkgMgr -> Bool -> Yes -> [(FilePath, [ExistNVRA])] -> IO ()
Documentation
The Select type specifies the subpackage selection
Can use name globs: eg "*-devel" or "lib*"
selectDefault :: Select Source #
Default package selection
selectRpmsOptions :: Parser Select Source #
An optparse-applicative Parser for Select
installArgs :: String -> Select Source #
An alternative CLI args option to parse String to Select of rpm packages
checkSelection :: Monad m => Select -> m () Source #
Check package Select options have no empty strings
(deprecated export)
rpmsToNVRAs :: [String] -> [NVRA] Source #
Converts a list of RPM files to sorted NVRA's
(since 0.3.1 no longer excludes debuginfo and debugsource packages)
Current state of a package NVR
Constructors
| ExistingNVR | NVR is already installed |
| ChangedNVR | NVR is different to installed package |
| NotInstalled | package is not currently installed |
Sets prompt default behaviour for yes/no questions
data ExistingStrategy Source #
How to handle already installed subpackages: re-install, skip, or default update
The default strategy is to select existing subpackages, otherwise all.
The constructors are only really needed internally but exported for documentation.
Constructors
| ExistingNoReinstall | skip reinstall of same NVRs |
| ExistingSkip | skip installed subpkgs |
| ExistingOnly | only update existing subpkgs |
| ExistingError | abort for existing subpkg |
Instances
| Eq ExistingStrategy Source # | |
Defined in SelectRPMs Methods (==) :: ExistingStrategy -> ExistingStrategy -> Bool (/=) :: ExistingStrategy -> ExistingStrategy -> Bool | |
existingStrategyOption :: Parser ExistingStrategy Source #
An optparse-applicative Parser for ExistingStrategy
Arguments
| :: Yes | prompt default choice |
| -> Bool | enable list mode which just displays the package list |
| -> Maybe ExistingStrategy | optional existing install strategy |
| -> Select | specifies package Select choices |
| -> String | package set prefix: allows Select'ing without prefix |
| -> [NVRA] | list of rpm packages to select from |
| -> IO [ExistNVRA] | returns list of selected rpm packages |
Decide list of NVRs based on a Select selection (using a package prefix)
Group rpms by arch (subdirs)
Package manager
Arguments
| :: Bool | dry-run |
| -> Bool | debug output |
| -> Maybe PkgMgr | optional specify package manager |
| -> Yes | prompt default choice |
| -> [(FilePath, [ExistNVRA])] | list of rpms to install with path |
| -> IO () |
Do installation of selected rpm packages
installRPMsAllowErasing Source #
Arguments
| :: Bool | dry-run |
| -> Bool | debug output |
| -> Maybe PkgMgr | optional specify package manager |
| -> Bool | use dnf --allowerasing |
| -> Yes | prompt default choice |
| -> [(FilePath, [ExistNVRA])] | list of rpms to install with path |
| -> IO () |
Do installation of packages (with allowerasing switch)
(since 0.3.1)