diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-02 08:59:00 -0700 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-02 08:59:00 -0700 |
| commit | 74e3e1f84cf2408bc822c48f810f37baa5cfffad (patch) | |
| tree | 4939ebafc97d3cc630c9accd4cb4b5ae31516761 /doc/todo | |
| parent | 7ba44cc7fb3b0897fa396a5b66068a2db7961afb (diff) | |
| parent | 64a79b979f3bfd555a85baf7e49dc9c9f6213268 (diff) | |
Merge branch 'master' of https://github.com/joeyh/propellor into pin
Diffstat (limited to 'doc/todo')
| -rw-r--r-- | doc/todo/new_apt_pinning_properties.mdwn | 8 | ||||
| -rw-r--r-- | doc/todo/new_apt_pinning_properties/comment_1_fd9e6775868eaa8d6aee49d06944ef0c._comment | 38 |
2 files changed, 46 insertions, 0 deletions
diff --git a/doc/todo/new_apt_pinning_properties.mdwn b/doc/todo/new_apt_pinning_properties.mdwn new file mode 100644 index 00000000..d32bcbb2 --- /dev/null +++ b/doc/todo/new_apt_pinning_properties.mdwn @@ -0,0 +1,8 @@ +My branch `pin` of repo `https://git.spwhitton.name/propellor` adds + +- `Apt.suiteAvailablePinned` +- `Apt.pinnedTo` +- `File.containsBlock` +- a haddock for `File.containsLines` + +There is one TODO in a comment that relates to propellor's algebraic data types. I'd be grateful for help with that. --spwhitton diff --git a/doc/todo/new_apt_pinning_properties/comment_1_fd9e6775868eaa8d6aee49d06944ef0c._comment b/doc/todo/new_apt_pinning_properties/comment_1_fd9e6775868eaa8d6aee49d06944ef0c._comment new file mode 100644 index 00000000..4800608f --- /dev/null +++ b/doc/todo/new_apt_pinning_properties/comment_1_fd9e6775868eaa8d6aee49d06944ef0c._comment @@ -0,0 +1,38 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2017-02-01T20:00:47Z" + content=""" +I wonder if it would be better to separate `suiteAvailablePinned` +into `suiteAvailable` and `suitePinned`? The latter could require +the former. + +`pinnedTo` should probably be DebianLike not UnixLike. +And its `[String]` parameter ought to be `[Package]`. + +Is `File.containsBlock` necessary? Seems that if you care about +ordering of blocks in the file, you generally should use +`File.hasContent` to specify the full content. Rather than using +/etc/apt/preferences.d/10propellor.pref for multiple properties, +you could use a separate file for each `pinnedTo'` with the parameters +encoded in the filename. + +As to the TODO, I tried adding this: + + robustly' :: RevertableProperty DebianLike DebianLike -> RevertableProperty DebianLike DebianLike + robustly' p = p `fallback` (update `before` p) + +And the compiler tells me it's wrong because `update` is not revertable. +But of course, there's no need to revert apt-get update, so this compiles: + + robustly' :: RevertableProperty DebianLike DebianLike -> RevertableProperty DebianLike DebianLike + robustly' p = p `fallback` ((update <!> (doNothing :: Property DebianLike)) `before` p) + +Cleaning it up left an an exersise for the reader. Might be possible +to combine `robustly` and `robustly'` into a single function, but I'm +not able to see how immediately. + +However.. Seems to me that whatever you wanted to use `robustly` with to +spur that TODO, you could just apply it to the first Property of the +RevertableProperty, and not to the second one? +"""]] |
