Skip to content

Commit

Permalink
Merge pull request #100 from yast/sync_after_restore
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jun 6, 2018
2 parents beb7fe8 + 5104e4b commit d10738e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions package/yast2-update.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Jun 6 11:19:12 UTC 2018 - lslezak@suse.cz

- Flush the disk cache after restoring the backup to mitigate
risk of data loss after unexpected reboot/poweroff after aborting
upgrade (bsc#1089643)
- 4.0.15

-------------------------------------------------------------------
Wed May 9 10:20:03 UTC 2018 - lslezak@suse.cz

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-update.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-update
Version: 4.0.14
Version: 4.0.15
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
4 changes: 4 additions & 0 deletions src/modules/Update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,10 @@ def create_restore_script(script_path, tarball_path, paths)
tar xvf #{tarball_path} --overwrite
# return back to original dir
cd -
# flush the caches
sync
# wait a bit to really write everything to disk (see "man sync")
sleep 3
EOF

File.write(script_path, script_content)
Expand Down

0 comments on commit d10738e

Please sign in to comment.