Hello community,

here is the log from the commit of package yast2-snapper for openSUSE:Factory 
checked in at 2014-05-10 08:31:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-snapper (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-snapper.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-snapper"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-snapper/yast2-snapper.changes      
2013-11-15 14:28:05.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-snapper.new/yast2-snapper.changes 
2014-05-10 08:31:55.000000000 +0200
@@ -1,0 +2,7 @@
+Tue May 06 16:23:35 CEST 2014 - [email protected]
+
+- improved error message on systems with no snapper configs
+  (bnc#876535)
+- 3.1.2
+
+-------------------------------------------------------------------

Old:
----
  yast2-snapper-3.1.1.tar.bz2

New:
----
  yast2-snapper-3.1.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-snapper.spec ++++++
--- /var/tmp/diff_new_pack.YdBtCG/_old  2014-05-10 08:31:56.000000000 +0200
+++ /var/tmp/diff_new_pack.YdBtCG/_new  2014-05-10 08:31:56.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-snapper
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-snapper
-Version:        3.1.1
+Version:        3.1.2
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -31,7 +31,7 @@
 BuildRequires:  update-desktop-files
 BuildRequires:  yast2
 BuildRequires:  yast2-core-devel >= 2.23.1
-BuildRequires:  yast2-devtools >= 3.0.6
+BuildRequires:  yast2-devtools >= 3.1.10
 BuildRequires:  yast2-testsuite
 
 Requires:       yast2 >= 2.21.22
@@ -44,6 +44,7 @@
 Summary:        YaST - file system snapshots review
 License:        GPL-2.0
 Group:          System/YaST
+Url:            http://github.com/yast/yast-snapper/
 
 %description
 YaST module for accessing and managing btrfs system snapshots

++++++ yast2-snapper-3.1.1.tar.bz2 -> yast2-snapper-3.1.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-3.1.1/VERSION 
new/yast2-snapper-3.1.2/VERSION
--- old/yast2-snapper-3.1.1/VERSION     2013-11-06 09:56:09.000000000 +0100
+++ new/yast2-snapper-3.1.2/VERSION     1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-3.1.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-3.1.1/package/yast2-snapper.changes 
new/yast2-snapper-3.1.2/package/yast2-snapper.changes
--- old/yast2-snapper-3.1.1/package/yast2-snapper.changes       2013-11-06 
09:56:09.000000000 +0100
+++ new/yast2-snapper-3.1.2/package/yast2-snapper.changes       2014-05-07 
10:51:44.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Tue May 06 16:23:35 CEST 2014 - [email protected]
+
+- improved error message on systems with no snapper configs
+  (bnc#876535)
+- 3.1.2
+
+-------------------------------------------------------------------
 Wed Nov 06 09:54:33 CET 2013 - [email protected]
 
 - added supplements snapper and yast2 (fate#314695)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-3.1.1/package/yast2-snapper.spec 
new/yast2-snapper-3.1.2/package/yast2-snapper.spec
--- old/yast2-snapper-3.1.1/package/yast2-snapper.spec  2013-11-06 
09:56:09.000000000 +0100
+++ new/yast2-snapper-3.1.2/package/yast2-snapper.spec  2014-05-07 
10:51:44.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-snapper
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-snapper
-Version:        3.1.1
+Version:        3.1.2
 Release:        0
 Group:         System/YaST
 
@@ -34,7 +34,7 @@
 BuildRequires: update-desktop-files
 BuildRequires: yast2
 BuildRequires: yast2-core-devel >= 2.23.1
-BuildRequires: yast2-devtools >= 3.0.6
+BuildRequires: yast2-devtools >= 3.1.10
 BuildRequires: yast2-testsuite
 
 Requires:      yast2 >= 2.21.22
@@ -45,6 +45,7 @@
 %requires_eq libsnapper2
 
 Summary:       YaST - file system snapshots review
+Url:            http://github.com/yast/yast-snapper/
 
 %description
 YaST module for accessing and managing btrfs system snapshots
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-3.1.1/src/modules/Snapper.rb 
new/yast2-snapper-3.1.2/src/modules/Snapper.rb
--- old/yast2-snapper-3.1.1/src/modules/Snapper.rb      2013-11-06 
09:56:09.000000000 +0100
+++ new/yast2-snapper-3.1.2/src/modules/Snapper.rb      2014-05-07 
10:51:44.000000000 +0200
@@ -53,9 +53,10 @@
       @selected_snapshot_index = 0
 
       # list of configurations
-      @configs = ["root"]
+      @configs = []
+
+      @current_config = ""
 
-      @current_config = "root"
     end
 
     # Return map of files modified between given snapshots
@@ -196,6 +197,7 @@
       true
     end
 
+
     def LastSnapperErrorMap
       Convert.to_map(SCR.Read(path(".snapper.error")))
     end
@@ -207,18 +209,19 @@
         :from => "any",
         :to   => "list <string>"
       )
-      if @configs == nil
-        # error popup
-        Report.Error(_("File /etc/sysconfig/snapper is not available."))
-        @configs = ["root"]
+
+      if @configs == nil || @configs.empty?
+        return false
       end
-      if !Builtins.contains(@configs, "root") &&
-          Ops.greater_than(Builtins.size(@configs), 0)
-        @current_config = Ops.get(@configs, 0, "root")
+
+      if @configs.include?("root")
+        @current_config = "root"
+      else
+        @current_config = @configs[0]
       end
-      deep_copy(@configs)
-    end
 
+      return true
+    end
 
 
     # Initialize snapper agent
@@ -246,9 +249,10 @@
           )
         )
       end
-      init
+      return init
     end
 
+
     # Delete existing snapshot
     # Return true on success
     def DeleteSnapshot(args)
@@ -343,7 +347,13 @@
 
       Progress.NextStage
 
-      ReadConfigs()
+      if !ReadConfigs()
+        # error popup
+        Report.Error(_("No snapper configurations exist. You have to create 
one or more
+configurations to use yast2-snapper. The snapper command line
+tool can be used to create configurations."))
+        return false
+      end
 
       return false if !InitializeSnapper(@current_config)
 
@@ -493,7 +503,7 @@
     publish :function => :GetFileModification, :type => "map (string, integer, 
integer)"
     publish :function => :ReadSnapshots, :type => "boolean ()"
     publish :function => :LastSnapperErrorMap, :type => "map ()"
-    publish :function => :ReadConfigs, :type => "list <string> ()"
+    publish :function => :ReadConfigs, :type => "boolean ()"
     publish :function => :InitializeSnapper, :type => "boolean (string)"
     publish :function => :DeleteSnapshot, :type => "boolean (map)"
     publish :function => :ModifySnapshot, :type => "boolean (map)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-3.1.1/testsuite/tests/ReadConfigs.out 
new/yast2-snapper-3.1.2/testsuite/tests/ReadConfigs.out
--- old/yast2-snapper-3.1.1/testsuite/tests/ReadConfigs.out     2013-11-06 
09:56:09.000000000 +0100
+++ new/yast2-snapper-3.1.2/testsuite/tests/ReadConfigs.out     2014-05-07 
10:51:44.000000000 +0200
@@ -1,13 +1,12 @@
 Read   .snapper.configs []
-Return []
-Return root
+Return false
+Return 
 Read   .snapper.configs nil
-Log    File /etc/sysconfig/snapper is not available.
-Return ["root"]
-Return root
+Return false
+Return 
 Read   .snapper.configs ["opt", "var", "root"]
-Return ["opt", "var", "root"]
+Return true
 Return root
 Read   .snapper.configs ["opt", "var"]
-Return ["opt", "var"]
+Return true
 Return opt

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to