Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write sdw-last-updated after upgrades in REBOOT_REQUIRED case #465

Merged
merged 1 commit into from
Feb 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions launcher/sdw_updater_gui/UpdaterApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,13 @@ def run(self):
results[vm] = result
self.progress_signal.emit(progress)

# write the flags to disk after successful updates, including updates
# that require a reboot.
run_results = Updater.overall_update_status(results)
Updater._write_updates_status_flag_to_disk(run_results)
if run_results in {UpdateStatus.UPDATES_OK, UpdateStatus.REBOOT_REQUIRED}:
# Write the "last updated" date to disk if the system is up-to-date.
# Even though no updates have been newly applied at this stage, for the
# purposes of security checks, all we need to know is that the system is
# up-to-date as of this run.
if run_results == UpdateStatus.UPDATES_OK:
Updater._write_last_updated_flags_to_disk()
# populate signal contents
message = results # copy all the information from results
Expand Down Expand Up @@ -290,7 +292,9 @@ def run(self):
# write flags to disk
run_results = Updater.overall_update_status(results)
Updater._write_updates_status_flag_to_disk(run_results)
if run_results == UpdateStatus.UPDATES_OK:
# Write the "last updated" date to disk if the system is up-to-date
# after applying upgrades, regardless of whether a reboot is still pending.
if run_results in {UpdateStatus.UPDATES_OK, UpdateStatus.REBOOT_REQUIRED}:
Updater._write_last_updated_flags_to_disk()
# populate signal results
message = results # copy all information from updater call
Expand Down