diff options
| author | Joey Hess <joey@kitenet.net> | 2014-11-20 16:04:48 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-11-20 16:04:48 -0400 |
| commit | 2293b46bf714ca5675515496c041952310b7bae2 (patch) | |
| tree | b710fd312bdbd960daa68f4f81c45c8983014e97 | |
| parent | a4f04fcb02d76d9903c5bbc65827565bad6c2d8c (diff) | |
fix chroot info propigation
| -rw-r--r-- | debian/changelog | 1 | ||||
| -rw-r--r-- | src/Propellor/Property/Chroot.hs | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 155d5124..e36e151e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,7 @@ propellor (1.0.0) UNRELEASED; urgency=medium in the main host list, and are instead passed to Docker.docked. (API change) * Added support for using debootstrap from propellor. + * Propellor can now be used to provision chroots. -- Joey Hess <id@joeyh.name> Mon, 10 Nov 2014 11:15:27 -0400 diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs index 38e09b52..9ce9ddaf 100644 --- a/src/Propellor/Property/Chroot.hs +++ b/src/Propellor/Property/Chroot.hs @@ -53,9 +53,11 @@ provisioned c@(Chroot loc system _) = RevertableProperty teardown = undefined propigateChrootInfo :: Chroot -> Property -> Property -propigateChrootInfo c@(Chroot loc _ h) p = propigateInfo c p (<> chrootinfo) - where - chrootinfo = mempty $ mempty { _chroots = M.singleton loc h } +propigateChrootInfo c p = propigateInfo c p (<> chrootInfo c) + +chrootInfo :: Chroot -> Info +chrootInfo (Chroot loc _ h) = + mempty { _chrootinfo = mempty { _chroots = M.singleton loc h } } -- | Propellor is run inside the chroot to provision it. -- |
