diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-07-04 12:38:21 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-04 12:38:21 -0400 |
| commit | faca829d537fd1e284483ba1bd0cfb8eaf0ed047 (patch) | |
| tree | fde4880d0341b47ac167f459028d7b4c7a182d8e /src | |
| parent | 9a4cb300b1b00052a33515c815fdc6bac77f7b9c (diff) | |
Bootstrap.bootstrappedFrom: Avoid doing anything when not run in a chroot.
This way, when a disk image is built using this property, and booted up,
running propellor won't try to ensure this property again.
This commit was sponsored by Jeff Goeke-Smith on Patreon.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Bootstrap.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Propellor/Property/Bootstrap.hs b/src/Propellor/Property/Bootstrap.hs index 099559ad..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 |
