| Age | Commit message (Collapse) | Author |
|
|
|
|
|
contents remain the same
Don't much like using Data.Hash.MD5, but it's available in dependencies and
pulling in a real hash library would be overkill. And md5 is a perfectly ok
hash to use here.
|
|
|
|
* Properties that run an arbitrary command, such as cmdProperty
and scriptProperty are converted to use UncheckedProperty, since
they cannot tell on their own if the command truely made a change or not.
(API Change)
Transition guide:
- When GHC complains about an UncheckedProperty, add:
`assume` MadeChange
- Since these properties used to always return MadeChange, that
change is always safe to make.
- Or, if you know that the command should modifiy a file, use:
`changesFile` filename
* A few properties have had their Result improved, for example
Apt.buldDep and Apt.autoRemove now check if a change was made or not.
|
|
needs its result checked, and checkResult and changesFile to check for changes.
|
|
|
|
RevertableProperty used to be assumed to contain info, but this is now made
explicit, with RevertableProperty HasInfo or RevertableProperty NoInfo.
Transition guide:
- If you define a RevertableProperty, expect some type check
failures like: "Expecting one more argument to ‘RevertableProperty’".
- Change it to "RevertableProperty NoInfo"
- The compiler will then tell you if it needs "HasInfo" instead.
- If you have code that uses the RevertableProperty constructor
that fails to type check, use the more powerful <!> operator
|
|
* Various property combinators that combined a RevertableProperty
with a non-revertable property used to yield a RevertableProperty.
This was a bug, because the combined property could not be fully
reverted in many cases. Fixed by making the combined property
instead be a Property HasInfo.
* combineWith now takes an addional parameter to control how revert
actions are combined (API change).
|
|
Hmm, do I really need my own type class for LiftPropellor? This seems like
a general problem so I am probably reinventing the wheel.
|
|
|
|
|
|
|
|
|
|
This involved some code changes, including some renaming of instance
methods. (ABI change)
|
|
|
|
|
|
|
|
I think this was inherited from flagFile, but the reasons to use caution
when using flagFile (that it makes code to satisfy a property only run once)
don't apply when using onChangeFlagOnFail.
|
|
It seems like `onChange` except that if property y fails, a flag file
is generated. On next runs, if the flag file is present, property y is
executed even if property x doesn't change.
With `onChange`, if y fails, the property x `onChange` y returns
`FailedChange`. But if this property is applied again, it returns
`NoChange`. This behavior can cause trouble...
|
|
|
|
|
|
* 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.
|
|
Not yet used
|
|
|
|
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.
|
|
|
|
(cherry picked from commit 1d02d589c79781cc4b0bd82467edbdf64c40f34d)
|
|
|
|
successfully run on a host.
|
|
|
|
factored out info up-propigation code rom Docker
|
|
Docker containers are now a separate data type, cannot be included in the
main host list, and are instead passed to Docker.docked. (API change)
|
|
Most of the hard part was making it be able to install debootstrap from
source, for use on non-debian-derived systems.
|
|
|
|
This reverts commit 26bef2486d27b2cde6feda633c6a7509675a3fe5.
|
|
This reverts commit 8d353813bf1e4d0c64f33cf2beed0938eeca92b4.
|
|
This reverts commit ac7b182b5a0f3711414757d05bb461385516e700.
|
|
|
|
This reverts commit 80f5b53f1b7fdc876d5e45df68c29f53bd9666b2.
|
|
|
|
This reverts commit 7637ea0af9ff4056cbdc16f25016785442d4b97e.
|
|
|
|
|
|
|
|
|
|
|
|
trying to satisfy all properties on the list before propigating the failure.
Audited all of my calls to combineProperties and they should be fine with
this behavior.. which suggests it's the right behavior.
|
|
|
|
The SetAttr hack used to be needed because the hostname was part of the
Attr, and was required to be present. Now that it's moved to Host, let's
get rid of that, since it tended to waste CPU.
|