add missing support for reverting chroot
wow, that was suprisingly trivial!
This commit is contained in:
parent
a904476333
commit
45349c210d
|
@ -42,15 +42,15 @@ provisioned c@(Chroot loc system _) = RevertableProperty
|
||||||
where
|
where
|
||||||
go desc a = property (chrootDesc c desc) $ ensureProperties [a]
|
go desc a = property (chrootDesc c desc) $ ensureProperties [a]
|
||||||
|
|
||||||
setup = provisionChroot c `requires` built
|
setup = provisionChroot c `requires` toProp built
|
||||||
|
|
||||||
built = case system of
|
built = case system of
|
||||||
(System (Debian _) _) -> debootstrap
|
(System (Debian _) _) -> debootstrap
|
||||||
(System (Ubuntu _) _) -> debootstrap
|
(System (Ubuntu _) _) -> debootstrap
|
||||||
|
|
||||||
debootstrap = toProp (Debootstrap.built loc system [])
|
debootstrap = Debootstrap.built loc system []
|
||||||
|
|
||||||
teardown = undefined
|
teardown = toProp (revert built)
|
||||||
|
|
||||||
propigateChrootInfo :: Chroot -> Property -> Property
|
propigateChrootInfo :: Chroot -> Property -> Property
|
||||||
propigateChrootInfo c p = propigateInfo c p (<> chrootInfo c)
|
propigateChrootInfo c p = propigateInfo c p (<> chrootInfo c)
|
||||||
|
|
Loading…
Reference in New Issue