Commit Graph

23 Commits

Author SHA1 Message Date
Joey Hess 0ee04ecc43 GADT properties seem to work (untested)
* Property has been converted to a GADT, and will be Property NoInfo
  or Property HasInfo.
  This was done to make sure that ensureProperty is only used on
  properties that do not have Info.
  Transition guide:
  - Change all "Property" to "Property NoInfo" or "Property WithInfo"
    (The compiler can tell you if you got it wrong!)
  - To construct a RevertableProperty, it is useful to use the new
    (<!>) operator
  - Constructing a list of properties can be problimatic, since
    Property NoInto and Property WithInfo are different types and cannot
    appear in the same list. To deal with this, "props" has been added,
    and can built up a list of properties of different types,
    using the same (&) and (!) operators that are used to build
    up a host's properties.
2015-01-24 22:38:51 -04:00
Joey Hess 414ee7eee6 added GADT to determine between a property with info and without
Not yet used
2015-01-24 16:53:59 -04:00
Joey Hess a738a20d79 export 2015-01-19 15:15:22 -04:00
Joey Hess 603e6d3406 split out types to improve haddock for Propellor.Types 2015-01-19 15:09:03 -04:00
Joey Hess 1ae21965aa rename HostLike to PropAccum
This is more general; it doesn't need to contain a Host.
It would, for example, be possible to make Property itself be an instance
of PropAccum.
2015-01-19 14:15:49 -04:00
Joey Hess afee550e70 Property tree
Properties now form a tree, instead of the flat list used before.

This simplifies propigation of Info from the Properties used inside a
container to the outer host; the Property that docks the container on the
host can just have as child properties all the inner Properties, and their
Info can then be gathered recursively. (Although in practice it still needs
to be filtered, since not all Info should propigate out of a container.)

Note that there is no change to how Properties are actually satisfied.
Just because a Property lists some child properties, this does not mean
they always have their propertySatisfy actions run. It's still up to the
parent property to run those actions.

That's necessary so that a container's properties can be satisfied inside
it, not outside. It also allows property combinators to
add the combined Properties to their childProperties list, even if,
like onChange, they don't always run the child properties at all.

Testing: I tested that the exact same Info is calculated before and after
this change, for every Host in my config file.
2015-01-18 18:46:38 -04:00
Joey Hess dc36a98fc1 Revert ensureProperty warning message, too many false positives in places where Info is correctly propigated. Better approach needed. 2014-12-21 21:33:03 -04:00
Joey Hess d194765e10
propellor spin 2014-12-21 21:14:11 -04:00
Joey Hess 5fefb161c3
propellor spin 2014-11-22 22:37:25 -04:00
Joey Hess 96ecbaad25 pute full path to bin/propellor inside shim 2014-11-22 22:10:53 -04:00
Joey Hess 6c92f1034f split out info types 2014-11-21 18:55:33 -04:00
Joey Hess 6e8b28cd3c
propellor spin 2014-11-21 17:11:26 -04:00
Joey Hess 9e611d87cd add debootstrap parameters 2014-11-21 15:55:27 -04:00
Joey Hess 36e89cd148 os info propigation
Also, lost the systemd-nspawn parameters; I'll do that some other way.
2014-11-21 14:31:13 -04:00
Joey Hess 7d4d3e4451 fix info propigation
Need to propigate the full container info, not the subset used in chroot
deployment.
2014-11-21 14:11:02 -04:00
Joey Hess 6a5a1bc761 systemd container may be mostly done (untested) 2014-11-21 12:17:03 -04:00
Joey Hess 45349c210d add missing support for reverting chroot
wow, that was suprisingly trivial!
2014-11-21 01:09:15 -04:00
Joey Hess a904476333 avoid console output when chaining into chroot and not at console 2014-11-21 01:05:51 -04:00
Joey Hess f9cc7c149e incomplete systemd container support 2014-11-20 17:18:26 -04:00
Joey Hess 3669bd61d0
propellor spin 2014-11-20 16:07:57 -04:00
Joey Hess 2293b46bf7 fix chroot info propigation 2014-11-20 16:04:48 -04:00
Joey Hess a4f04fcb02
propellor spin 2014-11-20 15:15:28 -04:00
Joey Hess b8b746a7f1 starting work on a Chroot module
factored out info up-propigation code rom Docker
2014-11-20 14:15:26 -04:00