Closed Saviq closed 5 months ago
Does this actually do the best thing?
The dance between run-daemon
, configure
and initialise-display-config
already looks fragile. And executing configure
to get the side effect of rewriting $SNAP_DATA/frame.display
seems to add complexity to that.
It looks like the elif grep "DO NOT EDIT THIS FILE BY HAND"...
clause in the configure
script is the better place to handle this case. (By removing the file regardless of the header.)
Does this actually do the best thing?
The dance between
run-daemon
,configure
andinitialise-display-config
already looks fragile. And executingconfigure
to get the side effect of rewriting$SNAP_DATA/frame.display
seems to add complexity to that.
On the one hand, yes - on the other, configure
should be idempotent, and safe… it already ran on refresh / installation just before this script. If we're not confident in it, that needs fixing.
I could just rewrite the file directly in the initialise-
script, but that risks them going out of sync…
It looks like the
elif grep "DO NOT EDIT THIS FILE BY HAND"...
clause in theconfigure
script is the better place to handle this case. (By removing the file regardless of the header.)
That would cause custom configuration (predating the display
key) to be overwritten on the first run of the configure
script e.g. on refresh. And we need to backport the fix to the 22
track.
Otherwise the file doesn't get the
DO NOT EDIT
header and things don't work as expected.Fixes #187