summaryrefslogtreecommitdiff
path: root/doc/todo/merge_request:_changes_to_Reboot.hs/comment_4_b39af83b7f793013a7d63f340ee8de6d._comment
blob: 148f8efbfcee4792a312a6a170491cc6a4a9367a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[[!comment format=mdwn
 username="joey"
 subject="""comment 4"""
 date="2016-06-14T03:41:53Z"
 content="""
When `requires` is used as in your first example, Reboot.toKernelNewerThan
does not need to throw an exception. It could just return FailedChange
and then Sbuild.builtFor wouldn't get run.

Your second example, as written is actually buggy. If Apt.upgraded
fails for some reason, then Reboot.toKernelNewerThan never gets run,
and then Sbuilt.builtFor can still run with the wrong kernel version.

The second example could instead be written thus:

	& osDebian Testing "i386"
	& combineProperties "sbuild setup"
		( props
			& Apt.stdSourcesList `onChange` (Apt.upgraded `before` Apt.cacheCleaned `before` Reboot.toKernelNewerThan "4")
			& Sbuilt.builtFor ...
		)

Then if any part of the upgrade fails the following properties don't run
thanks to `combineProperties`. And here too Reboot.toKernelNewerThan does
not need to thow an exception.

So, I'm not seeing any good use cases for it throwing an exception in these
examples.
"""]]