Skip to content

Commit

Permalink
abort warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Oct 5, 2015
1 parent 5d9a35a commit f4a7267
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/lib/migration/main_workflow.rb
Expand Up @@ -202,9 +202,25 @@ def perform_migration
# this client is located in the yast2-packager package
ret = Yast::WFM.CallFunction("inst_rpmcopy")
log.info "inst_rpmcopy result: #{ret.inspect}"

display_abort_message if ret == :abort || :cancel

ret
end

def display_abort_message
Yast::Report.Error(
# TRANSLATORS: an error message, the migration to a new service pack failed
# or was aborted, the partly migrated system should be restored from
# a snapshot or backup
_("The migration to the new service pack has failed. The system is most\n" \
"likely in an inconsistent state.\n" \
"\n" \
"We strongly recommend to rollback to a snapshot created before the\n" \
"migration was started (via selecting the snapshot in the boot menu\n" \
"if you use snapper) or restore the system from a backup."))
end

def create_pre_snapshot
if snapper_configured?
self.pre_snapshot = perform_snapshot(:pre, "before online migration")
Expand Down

0 comments on commit f4a7267

Please sign in to comment.