diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-07-05 14:03:07 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-05 14:03:07 -0400 |
| commit | 9d6c50fff28ed5ba7da7fdd2989c7773e357a3c3 (patch) | |
| tree | 6fba6644518aecd6fedfde5c42fbe01783f37aab /src/Propellor/Property/Bootstrap.hs | |
| parent | 05b0648e0be87700ecd7ce3a36c966aa96beff7b (diff) | |
| parent | e77e60604ac908e0895af202e83a47096d60b059 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Bootstrap.hs')
| -rw-r--r-- | src/Propellor/Property/Bootstrap.hs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Propellor/Property/Bootstrap.hs b/src/Propellor/Property/Bootstrap.hs index 5678a865..767d6ef7 100644 --- a/src/Propellor/Property/Bootstrap.hs +++ b/src/Propellor/Property/Bootstrap.hs @@ -17,17 +17,17 @@ data RepoSource -- | Bootstraps a propellor installation into -- /usr/local/propellor/ -- --- Normally, propellor is already bootstrapped when it runs, so this --- property is not useful. However, this can be useful inside a --- chroot used to build a disk image, to make the disk image --- have propellor installed. +-- This property only does anything when used inside a chroot. +-- This is particularly useful inside a chroot used to build a +-- disk image, to make the disk image have propellor installed. -- -- The git repository is cloned (or pulled to update if it already exists). -- -- All build dependencies are installed, using distribution packages -- or falling back to using cabal. bootstrappedFrom :: RepoSource -> Property Linux -bootstrappedFrom reposource = go `requires` clonedFrom reposource +bootstrappedFrom reposource = check inChroot $ + go `requires` clonedFrom reposource where go :: Property Linux go = property "Propellor bootstrapped" $ do @@ -35,7 +35,8 @@ bootstrappedFrom reposource = go `requires` clonedFrom reposource assumeChange $ exposeTrueLocaldir $ const $ runShellCommand $ buildShellCommand [ "cd " ++ localdir - , bootstrapPropellorCommand system + , checkDepsCommand system + , buildCommand ] -- | Clones the propellor repeository into /usr/local/propellor/ @@ -83,7 +84,7 @@ clonedFrom reposource = case reposource of -- configuration. copygitconfig :: Property Linux copygitconfig = property ("Propellor repo git config copied from outside the chroot") $ do - let gitconfig = localdir <> ".git" <> "config" + let gitconfig = localdir </> ".git" </> "config" cfg <- liftIO $ B.readFile gitconfig exposeTrueLocaldir $ const $ liftIO $ B.writeFile gitconfig cfg |
