From: Arvin Schnell Date: Mon, 13 Jul 2020 09:33:32 +0000 (+0200) Subject: - added error handing for failed ambit detection (bsc#1174038) X-Git-Tag: v0.8.11~1^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdc4d2b7214686bf9bb6fd9eab7b601e98ab431c;p=thirdparty%2Fsnapper.git - added error handing for failed ambit detection (bsc#1174038) --- diff --git a/VERSION b/VERSION index ef505616..83ce05d7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.10 +0.8.11 diff --git a/client/snapper.cc b/client/snapper.cc index cec688b1..98ec0095 100644 --- a/client/snapper.cc +++ b/client/snapper.cc @@ -1067,6 +1067,14 @@ command_rollback(cli::GlobalOptions& global_options, ProxySnappers* snappers, Pr if (global_options.ambit() == cli::GlobalOptions::Ambit::AUTO) { + if (previous_default == snapshots.end()) + { + cerr << _("Cannot detect ambit since default subvolume is unknown.") << '\n' + << _("This can happen if the system was not setup for rollback.") << '\n' + << _("The ambit can be specified manually using the --ambit option.") << endl; + exit(EXIT_FAILURE); + } + if (filesystem->isSnapshotReadOnly(previous_default->getNum())) global_options.set_ambit(cli::GlobalOptions::Ambit::TRANSACTIONAL); else @@ -1159,6 +1167,12 @@ command_rollback(cli::GlobalOptions& global_options, ProxySnappers* snappers, Pr { // see bsc #1172273 + if (previous_default == snapshots.end()) + { + cerr << _("Cannot do rollback since default subvolume is unknown.") << endl; + exit(EXIT_FAILURE); + } + ProxySnapshots::iterator snapshot = snapshots.end(); if (getopts.numArgs() == 0) diff --git a/package/snapper.changes b/package/snapper.changes index 7b989949..2e770953 100644 --- a/package/snapper.changes +++ b/package/snapper.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 13 11:29:13 CEST 2020 - aschnell@suse.com + +- added error handing for failed ambit detection (bsc#1174038) +- version 0.8.11 + ------------------------------------------------------------------- Tue Jun 16 18:31:47 CEST 2020 - aschnell@suse.com