debian-3.23: Modules for working with the Debian package systemSource codeContentsIndex
Debian.Repo.SourceTree
Contents
Source Tree
Synopsis
class Show t => SourceTreeC t where
topdir :: t -> FilePath
class (Show t, SourceTreeC t) => DebianSourceTreeC t where
debdir :: t -> FilePath
control :: t -> Control
entry :: t -> ChangeLogEntry
class (Show t, DebianSourceTreeC t) => DebianBuildTreeC t where
subdir :: t -> String
data SourceTree = SourceTree {
dir' :: FilePath
}
data DebianSourceTree = DebianSourceTree {
tree' :: SourceTree
control' :: Control
entry' :: ChangeLogEntry
}
data DebianBuildTree = DebianBuildTree {
topdir' :: FilePath
subdir' :: String
debTree' :: DebianSourceTree
}
findChanges :: DebianBuildTree -> IO (Either String ChangesFile)
data SourcePackageStatus
= All
| Indep
| None
buildDebs :: (DebianBuildTreeC t, CIO m) => Bool -> [String] -> OSImage -> t -> SourcePackageStatus -> m (Either String TimeDiff)
findSourceTree :: CIO m => FilePath -> m (Either String SourceTree)
copySourceTree :: (SourceTreeC t, CIO m) => t -> FilePath -> m (Either String SourceTree)
findDebianSourceTree :: CIO m => FilePath -> m (Either String DebianSourceTree)
copyDebianSourceTree :: (DebianSourceTreeC t, CIO m) => t -> FilePath -> m (Either String DebianSourceTree)
findDebianSourceTrees :: CIO m => FilePath -> m [(String, DebianSourceTree)]
findDebianBuildTree :: CIO m => FilePath -> String -> m (Either String DebianBuildTree)
findDebianBuildTrees :: CIO m => FilePath -> m [DebianBuildTree]
copyDebianBuildTree :: (DebianBuildTreeC t, CIO m) => t -> FilePath -> m (Either String DebianBuildTree)
findOneDebianBuildTree :: CIO m => FilePath -> m (Maybe DebianBuildTree)
explainSourcePackageStatus :: SourcePackageStatus -> String
addLogEntry :: DebianSourceTreeC t => ChangeLogEntry -> t -> IO ()
Source Tree
class Show t => SourceTreeC t whereSource
Any directory containing source code.
Methods
topdirSource
:: t
-> FilePathThe top directory of the source tree
show/hide Instances
class (Show t, SourceTreeC t) => DebianSourceTreeC t whereSource
A Debian source tree, which has a debian subdirectory containing at least a control file and a changelog.
Methods
debdirSource
:: t
-> FilePathThe directory containing the debian subdirectory
controlSource
:: t
-> ControlThe contents of debian/control
entrySource
:: t
-> ChangeLogEntryThe latest entry from debian/changelog
show/hide Instances
class (Show t, DebianSourceTreeC t) => DebianBuildTreeC t whereSource
A debian source tree plus a parent directory, which is where the binary and source deb packages appear after a build.
Methods
subdirSource
:: t
-> StringThe basename of debdir
show/hide Instances
data SourceTree Source
Any directory containing source code.
Constructors
SourceTree
dir' :: FilePath
show/hide Instances
data DebianSourceTree Source
A Debian source tree, which has a debian subdirectory containing at least a control file and a changelog.
Constructors
DebianSourceTree
tree' :: SourceTree
control' :: Control
entry' :: ChangeLogEntry
show/hide Instances
data DebianBuildTree Source
A Debian source tree plus a parent directory, which is where the binary and source deb packages appear after a build.
Constructors
DebianBuildTree
topdir' :: FilePath
subdir' :: String
debTree' :: DebianSourceTree
show/hide Instances
findChanges :: DebianBuildTree -> IO (Either String ChangesFile)Source
Find the .changes file which is generated by a successful run of dpkg-buildpackage.
data SourcePackageStatus Source
There are three possible results of a build: an upload consisting of only the architecture independent debs (Indep), one including both indep and binary debs (All), or with a failed build (None).
Constructors
All
Indep
None
show/hide Instances
buildDebs :: (DebianBuildTreeC t, CIO m) => Bool -> [String] -> OSImage -> t -> SourcePackageStatus -> m (Either String TimeDiff)Source
Run dpkg-buildpackage in a source tree.
findSourceTree :: CIO m => FilePath -> m (Either String SourceTree)Source
copySourceTree :: (SourceTreeC t, CIO m) => t -> FilePath -> m (Either String SourceTree)Source
Make a copy of a source tree in a directory.
findDebianSourceTree :: CIO m => FilePath -> m (Either String DebianSourceTree)Source
copyDebianSourceTree :: (DebianSourceTreeC t, CIO m) => t -> FilePath -> m (Either String DebianSourceTree)Source
findDebianSourceTrees :: CIO m => FilePath -> m [(String, DebianSourceTree)]Source
Find all the debian source trees in a directory.
findDebianBuildTree :: CIO m => FilePath -> String -> m (Either String DebianBuildTree)Source
Find the DebianBuildTree in a particular subdirectory.
findDebianBuildTrees :: CIO m => FilePath -> m [DebianBuildTree]Source
Find all the debian source trees in a directory.
copyDebianBuildTree :: (DebianBuildTreeC t, CIO m) => t -> FilePath -> m (Either String DebianBuildTree)Source
findOneDebianBuildTree :: CIO m => FilePath -> m (Maybe DebianBuildTree)Source
Find a DebianBuildTree inside a directory. It finds all the DebianSourceTrees, and if they all have the same package name it returns the newest one according to the version numbers. If there are none, or there are trees with different package names, Nothing is returned.
explainSourcePackageStatus :: SourcePackageStatus -> StringSource
addLogEntry :: DebianSourceTreeC t => ChangeLogEntry -> t -> IO ()Source
Rewrite the changelog with an added entry.
Produced by Haddock version 2.4.2