debian-3.69: Modules for working with the Debian package system

Safe HaskellNone




General Package Map Builders

makePackageMap :: (Paragraph -> a) -> (a -> a -> a) -> [(FilePath, Compression)] -> IO (Map ByteString a)Source

create a map of (package name, extracted field) from a list of index files

NOTE: we could merge all the files into a single control and then run packageMap over that. We currently do it one control file at a time to avoid having all the control files loaded in memory at once. However, I am not sure that property is actually occuring anyway. So, this should be revisited.

packageMap :: (Paragraph -> a) -> (a -> a -> a) -> Control -> Map ByteString aSource

create a map of (package name, max version) from a single control file

extractVersion :: Paragraph -> Maybe DebianVersionSource

extract the version number from a control paragraph

Trump Report



:: Fetcher

function for downloading package indexes

-> FilePath

cache directory to store index files in (must already exist)

-> String

binary architecture

-> [DebSource]

sources.list a

-> [DebSource]

sources.list b

-> IO (Map ByteString (DebianVersion, DebianVersion))

a map of trumped package names to (version a, version b)

compare two sources.list and find all the packages in the second that trump packages in the first see also: |trumpedMap|



:: Map ByteString DebianVersion

package map a

-> Map ByteString DebianVersion

package map b

-> Map ByteString (DebianVersion, DebianVersion)

trumped packages (version a, version b)

calculate all the trumped packages

trumpedXML :: Map ByteString (DebianVersion, DebianVersion) -> CFilter PosnSource

create / XML element and children from a trumped Map