Bug 731687

Summary: yast2 snapper fails if root config is unavailable but other configs are
Product: [openSUSE] openSUSE 12.1 Reporter: Arvin Schnell <aschnell>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: aschnell, jamesrome
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Arvin Schnell 2011-11-21 11:26:44 UTC
yast2 snapper fails if a "root" config is unavailable but other
configs are available. This is a valid setup, e.g. the user may
have / on ext4 but /home on btrfs and created a snapper config
"home".

Snapper::current_config should be set to "root" if that config
exists and any other existing config if "root" does not exist,
e.g. in Snapper::ReadConfig.
Comment 1 Jiří Suchomel 2011-11-21 12:25:28 UTC
Do you have a setup to test it?

I guess this patch should be enough:

--- Snapper.ycp (revision 66878)
+++ Snapper.ycp (working copy)
@@ -206,6 +206,10 @@
        Report::Error (_("File /etc/sysconfig/snapper is not available."));
        configs = [ "root" ];
     }
+    if (!contains (configs, "root") && size (configs) > 0)
+    {
+       current_config  = configs[0]:"root";
+    }
Comment 2 Arvin Schnell 2011-11-21 13:40:16 UTC
I don't have a full setup. After manually editing the configs and installing
the patch it seems ok.
Comment 3 Jiří Suchomel 2011-11-21 14:07:08 UTC
It's relevant for SP2:
created request id 16512

I wonder if it deserves update for 12.1. ... Maybe we should wait for other bugs to come and release a big patch?
Comment 4 James Rome 2011-11-21 14:13:58 UTC
Not only is this all true, but I had tried to make / btrfs, and the install program told me not to because things would fail. So the configuration with root should NEVER be present!
Comment 5 Bernhard Wiedemann 2011-11-21 15:00:16 UTC
This is an autogenerated message for OBS integration:
This bug (731687) was mentioned in
https://build.opensuse.org/request/show/92881 Factory / yast2-snapper
Comment 6 Jiří Suchomel 2011-11-21 15:05:43 UTC
Fixed for Factory
Comment 7 Bernhard Wiedemann 2011-11-24 15:00:22 UTC
This is an autogenerated message for OBS integration:
This bug (731687) was mentioned in
https://build.opensuse.org/request/show/93493 12.1 / yast2-snapper