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

Safe Haskell | None
Language | Haskell2010

Debian.Changes

Description

Changelog and changes file support.

Synopsis

- data ChangesFile = Changes {
  - changeDir :: FilePath
  - changePackage :: String
  - changeVersion :: DebianVersion
  - changeRelease :: Codename
  - changeArch :: Arch
  - changeInfo :: Paragraph' Text
  - changeEntry :: ChangeLogEntry
  - changeFiles :: [ChangedFileSpec]
  }
- data ChangedFileSpec = ChangedFileSpec {
  - changedFileMD5sum :: String
  - changedFileSHA1sum :: String
  - changedFileSHA256sum :: String
  - changedFileSize :: FileOffset
  - changedFileSection :: SubSection
  - changedFilePriority :: String
  - changedFileName :: FilePath
  }
- changesFileName :: ChangesFile -> String
- newtype ChangeLog = ChangeLog [ChangeLogEntry]
- data ChangeLogEntry
  - = Entry {
    - logPackage :: String
    - logVersion :: DebianVersion
    - logDists :: [Codename]
    - logUrgency :: String
    - logComments :: String
    - logWho :: String
    - logDate :: String
    }
  - | WhiteSpace String
- parseChangeLog :: String -> Either [[String]] ChangeLog
- parseEntries :: String -> [Either [String] ChangeLogEntry]
- parseEntry :: String -> Either [String] (ChangeLogEntry, String)
- parseChanges :: Text -> Maybe ChangeLogEntry

# Documentation

data ChangesFile Source #

A file generated by dpkg-buildpackage describing the result of a package build

Constructors

Changes |

Fields

- changeDir :: FilePath

  The full pathname of the directory holding the .changes file.

- changePackage :: String

  The package name parsed from the .changes file name

- changeVersion :: DebianVersion

  The version number parsed from the .changes file name

- changeRelease :: Codename

  The Distribution field of the .changes file

- changeArch :: Arch

  The architecture parsed from the .changes file name

- changeInfo :: Paragraph' Text

  The contents of the .changes file

- changeEntry :: ChangeLogEntry

  The value of the Changes field of the .changes file

- changeFiles :: [ChangedFileSpec]

  The parsed value of the Files attribute

#### Instances

Instances details

Read ChangesFile Source # |
Instance details Defined in Debian.Changes Methods readsPrec :: Int -> ReadS ChangesFile Source # readList :: ReadS [ChangesFile] Source # readPrec :: ReadPrec ChangesFile Source # readListPrec :: ReadPrec [ChangesFile] Source #
Show ChangesFile Source # |
Instance details Defined in Debian.Changes Methods showsPrec :: Int -> ChangesFile -> ShowS Source # show :: ChangesFile -> String Source # showList :: [ChangesFile] -> ShowS Source #
Eq ChangesFile Source # |
Instance details Defined in Debian.Changes Methods (==) :: ChangesFile -> ChangesFile -> Bool Source # (/=) :: ChangesFile -> ChangesFile -> Bool Source #
Pretty (PP ChangesFile) Source # |
Instance details Defined in Debian.Changes Methods pretty :: PP ChangesFile -> Doc Source # prettyVersioned :: CabalSpecVersion -> PP ChangesFile -> Doc Source #

data ChangedFileSpec Source #

An entry in the list of files generated by the build.

Constructors

ChangedFileSpec |

Fields

- changedFileMD5sum :: String
- changedFileSHA1sum :: String
- changedFileSHA256sum :: String
- changedFileSize :: FileOffset
- changedFileSection :: SubSection
- changedFilePriority :: String
- changedFileName :: FilePath

#### Instances

Instances details

Read ChangedFileSpec Source # |
Instance details Defined in Debian.Changes Methods readsPrec :: Int -> ReadS ChangedFileSpec Source # readList :: ReadS [ChangedFileSpec] Source # readPrec :: ReadPrec ChangedFileSpec Source # readListPrec :: ReadPrec [ChangedFileSpec] Source #
Show ChangedFileSpec Source # |
Instance details Defined in Debian.Changes Methods showsPrec :: Int -> ChangedFileSpec -> ShowS Source # show :: ChangedFileSpec -> String Source # showList :: [ChangedFileSpec] -> ShowS Source #
Eq ChangedFileSpec Source # |
Instance details Defined in Debian.Changes Methods (==) :: ChangedFileSpec -> ChangedFileSpec -> Bool Source # (/=) :: ChangedFileSpec -> ChangedFileSpec -> Bool Source #
Pretty (PP ChangedFileSpec) Source # |
Instance details Defined in Debian.Changes Methods pretty :: PP ChangedFileSpec -> Doc Source # prettyVersioned :: CabalSpecVersion -> PP ChangedFileSpec -> Doc Source #

changesFileName :: ChangesFile -> String Source #

newtype ChangeLog Source #

Constructors

ChangeLog [ChangeLogEntry] |

#### Instances

Instances details

Read ChangeLog Source # |
Instance details Defined in Debian.Changes Methods readsPrec :: Int -> ReadS ChangeLog Source # readList :: ReadS [ChangeLog] Source # readPrec :: ReadPrec ChangeLog Source # readListPrec :: ReadPrec [ChangeLog] Source #
Show ChangeLog Source # |
Instance details Defined in Debian.Changes Methods showsPrec :: Int -> ChangeLog -> ShowS Source # show :: ChangeLog -> String Source # showList :: [ChangeLog] -> ShowS Source #
Eq ChangeLog Source # |
Instance details Defined in Debian.Changes Methods (==) :: ChangeLog -> ChangeLog -> Bool Source # (/=) :: ChangeLog -> ChangeLog -> Bool Source #
Pretty (PP ChangeLog) Source # |
Instance details Defined in Debian.Changes Methods pretty :: PP ChangeLog -> Doc Source # prettyVersioned :: CabalSpecVersion -> PP ChangeLog -> Doc Source #

data ChangeLogEntry Source #

A changelog is a series of ChangeLogEntries

Constructors

Entry |

Fields

- logPackage :: String
- logVersion :: DebianVersion
- logDists :: [Codename]
- logUrgency :: String
- logComments :: String
- logWho :: String
- logDate :: String

WhiteSpace String | The parser here never returns this

#### Instances

Instances details

Read ChangeLogEntry Source # |
Instance details Defined in Debian.Changes Methods readsPrec :: Int -> ReadS ChangeLogEntry Source # readList :: ReadS [ChangeLogEntry] Source # readPrec :: ReadPrec ChangeLogEntry Source # readListPrec :: ReadPrec [ChangeLogEntry] Source #
Show ChangeLogEntry Source # |
Instance details Defined in Debian.Changes Methods showsPrec :: Int -> ChangeLogEntry -> ShowS Source # show :: ChangeLogEntry -> String Source # showList :: [ChangeLogEntry] -> ShowS Source #
Eq ChangeLogEntry Source # |
Instance details Defined in Debian.Changes Methods (==) :: ChangeLogEntry -> ChangeLogEntry -> Bool Source # (/=) :: ChangeLogEntry -> ChangeLogEntry -> Bool Source #
Pretty (PP ChangeLogEntry) Source # |
Instance details Defined in Debian.Changes Methods pretty :: PP ChangeLogEntry -> Doc Source # prettyVersioned :: CabalSpecVersion -> PP ChangeLogEntry -> Doc Source #
Pretty (PP [ChangeLogEntry]) Source # |
Instance details Defined in Debian.Changes Methods pretty :: PP [ChangeLogEntry] -> Doc Source # prettyVersioned :: CabalSpecVersion -> PP [ChangeLogEntry] -> Doc Source #

parseChangeLog :: String -> Either [[String]] ChangeLog Source #

Parse the entries of a debian changelog and verify they are all valid.

parseEntries :: String -> [Either [String] ChangeLogEntry] Source #

Parse a Debian Changelog and return a lazy list of entries

parseEntry :: String -> Either [String] (ChangeLogEntry, String) Source #

Parse a single changelog entry, returning the entry and the remaining text.

parseChanges :: Text -> Maybe ChangeLogEntry Source #

Parse the changelog information that shows up in the .changes file, i.e. a changelog entry with no signature.