diff options
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rw-r--r-- | src/Propellor/Property/Bootstrap.hs | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog index 7ef4dfe7..c52b8329 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ propellor (4.0.7) UNRELEASED; urgency=medium refuse to operate on disk images not aligned to a sector size. * Bootstrap.bootstrappedFrom: Fix bug that caused propellor to only be built from the bootstrapped config the first time. + * Bootstrap.bootstrappedFrom: Avoid doing anything when not run in a + chroot. -- Joey Hess <id@joeyh.name> Tue, 20 Jun 2017 10:55:37 -0400 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 |
