debian-3.17.1: Modules for working with the Debian package systemSource codeContentsIndex
Debian.Repo.OSImage
Synopsis
data OSImage = OS {
osGlobalCacheDir :: FilePath
osRoot :: EnvRoot
osBaseDistro :: SliceList
osReleaseName :: ReleaseName
osArch :: Arch
osLocalRepoMaster :: Maybe LocalRepository
osSourcePackages :: [SourcePackage]
osBinaryPackages :: [BinaryPackage]
}
prepareEnv :: CIO m => FilePath -> EnvRoot -> NamedSliceList -> Maybe LocalRepository -> Bool -> SourcesChangedAction -> [String] -> [String] -> [String] -> AptIOT m OSImage
updateEnv :: CIO m => OSImage -> AptIOT m (Either String OSImage)
syncPool :: CIO m => OSImage -> m OSImage
chrootEnv :: OSImage -> EnvRoot -> OSImage
syncEnv :: CIO m => OSImage -> OSImage -> m OSImage
neuterEnv :: CIO m => OSImage -> m OSImage
restoreEnv :: OSImage -> IO OSImage
removeEnv :: OSImage -> IO ()
buildEssential :: OSImage -> Bool -> IO Relations
Documentation
data OSImage Source
This type represents an OS image located at osRoot built from a particular osBaseDistro using a particular osArch. If an osLocalRepo argument is given, that repository will be copied into the environment and kept in sync, and lines will be added to sources.list to point to it.
Constructors
OS
osGlobalCacheDir :: FilePath
osRoot :: EnvRoot
osBaseDistro :: SliceList
osReleaseName :: ReleaseName
osArch :: Arch
osLocalRepoMaster :: Maybe LocalRepositoryThe associated local repository, where packages we build inside this image are first uploaded to.
osSourcePackages :: [SourcePackage]A copy of osLocalRepo which is inside the changeroot , osLocalRepoCopy :: Maybe LocalRepo | Update and return a copy of the local repository which is inside the changeroot.
osBinaryPackages :: [BinaryPackage]
show/hide Instances
prepareEnvSource
:: CIO m
=> FilePath
-> EnvRootThe location where image is to be built
-> NamedSliceListThe sources.list
-> Maybe LocalRepositoryThe associated local repository, where newly built packages are stored. This repository is periodically copied into the build environment so apt can access the packages in it.
-> BoolIf true, remove and rebuild the image
-> SourcesChangedActionWhat to do if called with a sources.list that differs from the previous call (unimplemented)
-> [String]Extra packages to treat as essential
-> [String]Packages to consider non-essential even if marked essential
-> [String]Extra packages to install during the build
-> AptIOT m OSImage
Create or update an OS image in which packages can be built.
updateEnv :: CIO m => OSImage -> AptIOT m (Either String OSImage)Source
Try to update an existing build environment: run apt-get update and dist-upgrade.
syncPool :: CIO m => OSImage -> m OSImageSource
Use rsync to synchronize the pool of locally built packages from outside the build environment to the location inside the environment where apt can see and install the packages.
chrootEnv :: OSImage -> EnvRoot -> OSImageSource
syncEnv :: CIO m => OSImage -> OSImage -> m OSImageSource
neuterEnv :: CIO m => OSImage -> m OSImageSource
To neuter an executable is to replace it with a hard link to /bin/true in such a way that the operation can be reversed. This is done in order to make it safe to install files into it when it isn't live. If this operation fails it is assumed that the image is damaged, so it is removed.
restoreEnv :: OSImage -> IO OSImageSource
Reverse the neuterEnv operation.
removeEnv :: OSImage -> IO ()Source
Remove an image. The removeRecursiveSafely function is used to ensure that any file systems mounted inside the image are unmounted instead of destroyed.
buildEssential :: OSImage -> Bool -> IO RelationsSource
Build the dependency relations for the build essential packages. For this to work the build-essential package must be installed in the OSImage.
Produced by Haddock version 2.4.2