From ba10f91a450247191bb97b106a9d8b8670ad44a2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 1 Feb 2017 16:17:08 -0400 Subject: comment --- ...ent_1_fd9e6775868eaa8d6aee49d06944ef0c._comment | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 doc/todo/new_apt_pinning_properties/comment_1_fd9e6775868eaa8d6aee49d06944ef0c._comment 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? +"""]] -- cgit v1.2.3