9e2ceca06f
This has a bit of history, but essentially in 1c01141e, we made both `upgrade` and `deploy` automatically exit 77 if there were no changes. Then in c3f1e7c8, we only changed `upgrade` so that it became gated behind `--upgrade-unchanged-exit-77`. I think we should carry this forward into `deploy` as well. The way I look at this is: the default UX shouldn't require users to care about special exit codes. That's something scripts care about. In its vanilla form, either a command should error out or succeed. This patch tries to add some consistency by introducing a new `--unchanged-exit-77` in both `deploy` and `upgrade` (where it just replaces the previous switch). The naming here matches what `install` has too. So... this does break backwards compatibility for any scripts which relied on that behaviour. Though the only app I know today which wants deploy semantics and doesn't use the D-Bus API is Zincati, which actually hit this issue. There's also RHCOS, though the `pivot` there uses `rebase`, not `deploy`. So overall, I think this is worth breaking now while we're still in a transitionary period in the downstreams? Closes: #1906 Approved by: cgwalters