]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- added error handing for failed ambit detection (bsc#1174038)
authorArvin Schnell <aschnell@suse.de>
Mon, 13 Jul 2020 09:33:32 +0000 (11:33 +0200)
committerArvin Schnell <aschnell@suse.de>
Mon, 13 Jul 2020 09:33:32 +0000 (11:33 +0200)
VERSION
client/snapper.cc
package/snapper.changes

diff --git a/VERSION b/VERSION
index ef50561618332fd82aeacc53dc4292ba32897c52..83ce05d72fbfaf780ead84b34d6dfbc7a18a3efb 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.8.10
+0.8.11
index cec688b12d76cc51695d6aff9696afea68af6df8..98ec00956da279d682a21073406e543cd6c54066 100644 (file)
@@ -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)
index 7b989949094f0299111cc502c6738db43ff9f3dc..2e7709532a63bb09a461bf77498af638f898cffa 100644 (file)
@@ -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