select-rpms-0.3.1: Select a subset of RPM packages
Safe HaskellNone
LanguageHaskell2010

SelectRPMs

Synopsis

Documentation

data Select Source #

The Select type specifies the subpackage selection

Can use name globs: eg "*-devel" or "lib*"

Constructors

All

all packages

Ask

interactive prompting

PkgsReq 

Fields

  • [String]

    include matches

  • [String]

    except matches

  • [String]

    exclude

  • [String]

    added

Instances

Instances details
Eq Select Source # 
Instance details

Defined in SelectRPMs

Methods

(==) :: Select -> Select -> Bool

(/=) :: Select -> Select -> Bool

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)

data Existence Source #

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

Instances

Instances details
Show Existence Source # 
Instance details

Defined in SelectRPMs

Methods

showsPrec :: Int -> Existence -> ShowS

show :: Existence -> String

showList :: [Existence] -> ShowS

Eq Existence Source # 
Instance details

Defined in SelectRPMs

Methods

(==) :: Existence -> Existence -> Bool

(/=) :: Existence -> Existence -> Bool

Ord Existence Source # 
Instance details

Defined in SelectRPMs

Methods

compare :: Existence -> Existence -> Ordering

(<) :: Existence -> Existence -> Bool

(<=) :: Existence -> Existence -> Bool

(>) :: Existence -> Existence -> Bool

(>=) :: Existence -> Existence -> Bool

max :: Existence -> Existence -> Existence

min :: Existence -> Existence -> Existence

type ExistNVRA = (Existence, NVRA) Source #

Combines Existence state with an NVRA

data Yes Source #

Sets prompt default behaviour for yes/no questions

Constructors

No 
Yes 

Instances

Instances details
Eq Yes Source # 
Instance details

Defined in SelectRPMs

Methods

(==) :: Yes -> Yes -> Bool

(/=) :: Yes -> Yes -> Bool

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

Instances details
Eq ExistingStrategy Source # 
Instance details

Defined in SelectRPMs

existingStrategyOption :: Parser ExistingStrategy Source #

An optparse-applicative Parser for ExistingStrategy

decideRPMs Source #

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)

nvraToRPM :: NVRA -> FilePath Source #

Render a NVRA as rpm file

groupOnArch Source #

Arguments

:: FilePath

prefix directory (eg RPMS)

-> [ExistNVRA] 
-> [(FilePath, [ExistNVRA])] 

Group rpms by arch (subdirs)

data PkgMgr Source #

Package manager

Constructors

DNF3 
DNF5 
RPM 
OSTREE 

Instances

Instances details
Eq PkgMgr Source # 
Instance details

Defined in SelectRPMs

Methods

(==) :: PkgMgr -> PkgMgr -> Bool

(/=) :: PkgMgr -> PkgMgr -> Bool

pkgMgrOpt :: Parser PkgMgr Source #

An optparse-applicative Parser for PkgMgr

(since 0.3.1)

installRPMs Source #

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)