Hello community,

here is the log from the commit of package yast2-snapper for openSUSE:Factory
checked in at Tue May 31 16:23:47 CEST 2011.



--------
--- yast2-snapper/yast2-snapper.changes 2011-05-11 11:27:09.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-snapper/yast2-snapper.changes    
2011-05-30 14:57:36.000000000 +0200
@@ -1,0 +2,6 @@
+Mon May 30 14:55:11 CEST 2011 - jsuch...@suse.cz
+
+- ask snapper library for snapshot paths
+- 2.21.6 
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


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

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

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

Other differences:
------------------
++++++ yast2-snapper.spec ++++++
--- /var/tmp/diff_new_pack.kA65L5/_old  2011-05-31 16:20:35.000000000 +0200
+++ /var/tmp/diff_new_pack.kA65L5/_new  2011-05-31 16:20:35.000000000 +0200
@@ -19,12 +19,12 @@
 
 
 Name:           yast2-snapper
-Version:        2.21.5
+Version:        2.21.6
 Release:        1
 
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-snapper-2.21.5.tar.bz2
+Source0:        yast2-snapper-2.21.6.tar.bz2
 
 Prefix:         /usr
 
@@ -38,7 +38,7 @@
 YaST module for accessing and managing btrfs system snapshots
 
 %prep
-%setup -n yast2-snapper-2.21.5
+%setup -n yast2-snapper-2.21.6
 
 %build
 %{prefix}/bin/y2tool y2autoconf

++++++ yast2-snapper-2.21.5.tar.bz2 -> yast2-snapper-2.21.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-2.21.5/VERSION 
new/yast2-snapper-2.21.6/VERSION
--- old/yast2-snapper-2.21.5/VERSION    2011-05-11 10:42:39.000000000 +0200
+++ new/yast2-snapper-2.21.6/VERSION    2011-05-30 14:55:40.000000000 +0200
@@ -1 +1 @@
-2.21.5
+2.21.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-2.21.5/agent-snapper/doc/snapper.html 
new/yast2-snapper-2.21.6/agent-snapper/doc/snapper.html
--- old/yast2-snapper-2.21.5/agent-snapper/doc/snapper.html     2011-05-11 
11:24:58.000000000 +0200
+++ new/yast2-snapper-2.21.6/agent-snapper/doc/snapper.html     2011-05-30 
14:55:00.000000000 +0200
@@ -56,6 +56,21 @@
        </td>
        </tr>
 
+       <tr><td><tt>.snapper.path</td><td>YCPMap</td><td 
align="left">YCPMap</td>
+       <td>Return the path to directory with given snapshot<br>
+       <b>Example of argument map</b>:
+           <pre>
+           $[
+               "num"   : 1,
+           $]
+           </pre>
+       <b>Example of result</b>:
+       <pre>
+           "/snapshots/1/snapshot"
+       </pre>
+       </td>
+       </tr>
+
        <tr><td><tt>.snapper.snapshots</td><td>(none)</td><td 
align="left">YCPList</td>
        <td>Return list of current snapshot maps.<br>
        <b>Example of result</b>:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-snapper-2.21.5/agent-snapper/src/SnapperAgent.cc 
new/yast2-snapper-2.21.6/agent-snapper/src/SnapperAgent.cc
--- old/yast2-snapper-2.21.5/agent-snapper/src/SnapperAgent.cc  2011-05-06 
08:28:32.000000000 +0200
+++ new/yast2-snapper-2.21.6/agent-snapper/src/SnapperAgent.cc  2011-05-30 
14:51:45.000000000 +0200
@@ -148,7 +148,7 @@
     if (path->length() == 1) {
 
        /**
-        * error: Read (.snapper.error) -> returns last error message
+        * Read (.snapper.error) -> returns last error message
         */
        if (PC(0) == "error") {
            YCPMap retmap;
@@ -156,6 +156,21 @@
            return retmap;
        }
        /**
+        * Read (.snapper.path, $[ "num" : num]) -> returns the path to 
directory with given snapshot
+        */
+       if (PC(0) == "path") {
+           unsigned int num    = getIntValue (argmap, "num", 0);
+           const Snapshots& snapshots = sh->getSnapshots();
+           Snapshots::const_iterator snap = snapshots.find(num);
+           if (snap == snapshots.end())
+           {
+               y2error ("snapshot '%d' not found", num);
+               return ret;
+           }
+           return YCPString (snap->snapshotDir());
+       }
+
+       /**
         * Read(.snapper.snapshots) -> return list of snapshot description maps
         */
        if (PC(0) == "snapshots") {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-2.21.5/configure 
new/yast2-snapper-2.21.6/configure
--- old/yast2-snapper-2.21.5/configure  2011-04-12 08:42:39.000000000 +0200
+++ new/yast2-snapper-2.21.6/configure  2011-05-26 10:37:35.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for yast2-snapper 2.21.2.
+# Generated by GNU Autoconf 2.68 for yast2-snapper 2.21.5.
 #
 # Report bugs to <http://bugs.opensuse.org/>.
 #
@@ -709,8 +709,8 @@
 # Identity of this package.
 PACKAGE_NAME='yast2-snapper'
 PACKAGE_TARNAME='yast2-snapper'
-PACKAGE_VERSION='2.21.2'
-PACKAGE_STRING='yast2-snapper 2.21.2'
+PACKAGE_VERSION='2.21.5'
+PACKAGE_STRING='yast2-snapper 2.21.5'
 PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
 PACKAGE_URL=''
 
@@ -1490,7 +1490,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures yast2-snapper 2.21.2 to adapt to many kinds of systems.
+\`configure' configures yast2-snapper 2.21.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1561,7 +1561,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of yast2-snapper 2.21.2:";;
+     short | recursive ) echo "Configuration of yast2-snapper 2.21.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1675,7 +1675,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-yast2-snapper configure 2.21.2
+yast2-snapper configure 2.21.5
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2128,7 +2128,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by yast2-snapper $as_me 2.21.2, which was
+It was created by yast2-snapper $as_me 2.21.5, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3058,7 +3058,7 @@
 
 # Define the identity of the package.
  PACKAGE='yast2-snapper'
- VERSION='2.21.2'
+ VERSION='2.21.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3180,7 +3180,7 @@
 
 
 
-VERSION="2.21.2"
+VERSION="2.21.5"
 RPMNAME="yast2-snapper"
 MAINTAINER="Jiri Suchomel <jsuch...@suse.cz>"
 
@@ -15994,7 +15994,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by yast2-snapper $as_me 2.21.2, which was
+This file was extended by yast2-snapper $as_me 2.21.5, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16060,7 +16060,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-yast2-snapper config.status 2.21.2
+yast2-snapper config.status 2.21.5
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-2.21.5/configure.in 
new/yast2-snapper-2.21.6/configure.in
--- old/yast2-snapper-2.21.5/configure.in       2011-04-12 08:42:32.000000000 
+0200
+++ new/yast2-snapper-2.21.6/configure.in       2011-05-26 10:37:27.000000000 
+0200
@@ -3,7 +3,7 @@
 dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! --
 dnl    (edit configure.in.in instead)
 
-AC_INIT(yast2-snapper, 2.21.2, http://bugs.opensuse.org/, yast2-snapper)
+AC_INIT(yast2-snapper, 2.21.5, http://bugs.opensuse.org/, yast2-snapper)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -18,7 +18,7 @@
 AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
 
 dnl Important YaST2 variables
-VERSION="2.21.2"
+VERSION="2.21.5"
 RPMNAME="yast2-snapper"
 MAINTAINER="Jiri Suchomel <jsuch...@suse.cz>"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-2.21.5/snapper.pot 
new/yast2-snapper-2.21.6/snapper.pot
--- old/yast2-snapper-2.21.5/snapper.pot        1970-01-01 01:00:00.000000000 
+0100
+++ new/yast2-snapper-2.21.6/snapper.pot        2011-05-26 10:37:42.000000000 
+0200
@@ -0,0 +1,276 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-05-26 10:37+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <l...@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/Snapper.ycp:183
+msgid "Reason not known."
+msgstr ""
+
+#: src/Snapper.ycp:186
+msgid "Configuration not found."
+msgstr ""
+
+#: src/Snapper.ycp:190
+msgid "Configuration is not valid."
+msgstr ""
+
+#. error popup
+#: src/Snapper.ycp:195
+#, ycp-format
+msgid ""
+"Failed to initialize snapper library:\n"
+"%1"
+msgstr ""
+
+#. Snapper read dialog caption
+#: src/Snapper.ycp:209
+msgid "Initializing Snapper"
+msgstr ""
+
+#. Progress stage 1/3
+#: src/Snapper.ycp:216
+msgid "Read the list of snapshots"
+msgstr ""
+
+#. Progress step 1/3
+#: src/Snapper.ycp:219
+msgid "Reading the database..."
+msgstr ""
+
+#. Progress finished
+#: src/Snapper.ycp:221
+msgid "Finished"
+msgstr ""
+
+#. label for log window
+#: src/Snapper.ycp:262
+msgid "Restoring Files..."
+msgstr ""
+
+#. log entry (%1 is file name)
+#: src/Snapper.ycp:279
+#, ycp-format
+msgid "%1 does not exist in snapshot %2\n"
+msgstr ""
+
+#. log entry (%1 is file name)
+#: src/Snapper.ycp:304
+#, ycp-format
+msgid "%1 skipped\n"
+msgstr ""
+
+#. summary dialog caption
+#: src/dialogs.ycp:68
+msgid "Snapshots"
+msgstr ""
+
+#: src/dialogs.ycp:86
+msgid "Single"
+msgstr ""
+
+#: src/dialogs.ycp:100
+msgid "Pre & Post"
+msgstr ""
+
+#. table header
+#: src/dialogs.ycp:111
+msgid "ID"
+msgstr ""
+
+#: src/dialogs.ycp:111
+msgid "Type"
+msgstr ""
+
+#: src/dialogs.ycp:111
+msgid "Start Date"
+msgstr ""
+
+#: src/dialogs.ycp:111
+msgid "End Date"
+msgstr ""
+
+#: src/dialogs.ycp:111
+msgid "Description"
+msgstr ""
+
+#: src/dialogs.ycp:115
+msgid "Show Changes"
+msgstr ""
+
+#. dialog caption
+#: src/dialogs.ycp:172
+msgid "Selected Snapshot Overview"
+msgstr ""
+
+#. '%1: %2' means 'ID: description', adapt the order if necessary
+#: src/dialogs.ycp:202
+#, ycp-format
+msgid "%1: %2"
+msgstr ""
+
+#. busy popup message
+#: src/dialogs.ycp:219
+msgid "Calculating changed files..."
+msgstr ""
+
+#. busy popup message
+#: src/dialogs.ycp:288
+msgid "Calculating file modifications..."
+msgstr ""
+
+#. text label, %1, %2 are file modes (like '-rw-r--r--')
+#: src/dialogs.ycp:321
+#, ycp-format
+msgid "File mode was changed from '%1' to '%2'."
+msgstr ""
+
+#. text label, %1, %2 are user names
+#: src/dialogs.ycp:329
+#, ycp-format
+msgid "File user ownership was changed from '%1' to '%2'."
+msgstr ""
+
+#. text label, %1, %2 are group names
+#: src/dialogs.ycp:338
+#, ycp-format
+msgid "File group ownership was changed from '%1' to '%2'."
+msgstr ""
+
+#. button label
+#: src/dialogs.ycp:359
+msgid "R&estore From First"
+msgstr ""
+
+#. button label
+#: src/dialogs.ycp:361
+msgid "Restore"
+msgstr ""
+
+#: src/dialogs.ycp:361
+msgid "Res&tore From Second"
+msgstr ""
+
+#. radio button label
+#: src/dialogs.ycp:396
+msgid "Show the difference between snapshot and current system"
+msgstr ""
+
+#. radio button label, snapshot selection will follow
+#: src/dialogs.ycp:400
+msgid "Show the difference between current and selected snapshot:"
+msgstr ""
+
+#. radio button label
+#: src/dialogs.ycp:421
+msgid "Show the difference between first and second snapshot"
+msgstr ""
+
+#. radio button label
+#: src/dialogs.ycp:424
+msgid "Show the difference between first snapshot and current system"
+msgstr ""
+
+#. radio button label
+#: src/dialogs.ycp:427
+msgid "Show the difference between second snapshot and current system"
+msgstr ""
+
+#. label, date string will follow at the end of line
+#: src/dialogs.ycp:445
+msgid "Time of taking the first snapshot:"
+msgstr ""
+
+#. label, date string will follow at the end of line
+#: src/dialogs.ycp:450
+msgid "Time of taking the second snapshot:"
+msgstr ""
+
+#. label, date string will follow at the end of line
+#: src/dialogs.ycp:459
+msgid "Time of taking the snapshot:"
+msgstr ""
+
+#. button label
+#: src/dialogs.ycp:478
+msgid "&Open"
+msgstr ""
+
+#. button label
+#: src/dialogs.ycp:502
+msgid "Restore Selected"
+msgstr ""
+
+#. popup message
+#: src/dialogs.ycp:605
+msgid "No file was selected for restoring"
+msgstr ""
+
+#. FIXME restore from PRE or POST? (PRE by default)
+#. popup headline
+#: src/dialogs.ycp:610
+msgid "Restoring files"
+msgstr ""
+
+#. popup message, %1 is snapshot number, %2 list of files
+#: src/dialogs.ycp:612
+#, ycp-format
+msgid "These files will be copied from snapshot '%1' to current system: 
<p>%2</p>Are you sure?"
+msgstr ""
+
+#. Read dialog help
+#: src/helps.ycp:40
+msgid ""
+"<p><b><big>Reading the list of snapshots</big></b><br>\n"
+"Please wait...<br></p>\n"
+msgstr ""
+
+#. Summary dialog help:
+#: src/helps.ycp:45
+msgid ""
+"<p><b><big>Snapshots Configuration</big></b><p>\n"
+"<p>The table shows a list of root filesystem snapshots. There are three types 
of snapshots, <b>single</b>, <b>pre</b> and <b>post</b>. Single snapshots are 
used for storing file system state in certain time, while Pre and Post are used 
to define the changes done by special operation proceeded between taking those 
two snapshots. Pre and Post snapshots are coupled together in the table.</p>\n"
+"<p>Select a snapshot or snapshot couple and click <b>Show Changes</b> to see 
the file system changes new in specified snapshot.</p>\n"
+msgstr ""
+
+#. Show snapshot dialog help
+#: src/helps.ycp:51
+msgid ""
+"<p><b><big>Snapshot Overview</big></b><p>\n"
+"<p>\n"
+"The tree shows all the files that were modified between creating first 
('pre') and second ('post') snapshot. On the right side, you can see the 
description generated when the first snapshot was created and the time of 
creation for both snapshots.\n"
+"</p>\n"
+"<p>\n"
+"When file is selected in the tree, you can see the changes done to it. By 
default, changes between selected coupled snapshots are shown, but it is 
possible to compare the file with different versions.\n"
+"</p>"
+msgstr ""
+
+#. Show snapshot dialog help, alternative for single snapshots
+#: src/helps.ycp:60
+msgid ""
+"<p><b><big>Snapshot Overview</big></b><p>\n"
+"<p>\n"
+"The tree shows all the files that are different between selected snapshot and 
current system. On the right side, you can see the snapshot description and 
time of its creation.\n"
+"</p>\n"
+"<p>\n"
+"When file is selected in the tree, you can see the its difference between 
snapshot version and current system.\n"
+"</p>"
+msgstr ""
+
+#: src/snapper.ycp:53
+msgid "Configuration of system snapshots"
+msgstr ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-snapper-2.21.5/src/Snapper.ycp 
new/yast2-snapper-2.21.6/src/Snapper.ycp
--- old/yast2-snapper-2.21.5/src/Snapper.ycp    2011-05-06 08:06:27.000000000 
+0200
+++ new/yast2-snapper-2.21.6/src/Snapper.ycp    2011-05-30 14:52:04.000000000 
+0200
@@ -23,7 +23,7 @@
  * Summary:    Snapper settings, input and output functions
  * Authors:    Jiri Suchomel <jsuch...@suse.cz>
  *
- * $Id: Snapper.ycp 63915 2011-05-05 15:42:45Z jsuchome $
+ * $Id: Snapper.ycp 64143 2011-05-30 12:51:39Z jsuchome $
  *
  * Representation of the configuration of snapper.
  * Input and output routines.
@@ -43,8 +43,6 @@
 // global list of all snapshot
 global list<map> snapshots     = [];
 
-global string snapshots_path   = "/snapshots";
-
 global map selected_snapshot   = $[];
 
 // mapping of snapshot number to index in snapshots list
@@ -70,15 +68,28 @@
 }
 
 /**
+ * Return the path to given snapshot
+ */
+global string GetSnapshotPath (integer snapshot_num) {
+    string ret = (string) SCR::Read (.snapper.path, $[ "num" : snapshot_num ]);
+    if (ret == nil)
+    {
+       ret     = "";
+       // popup error
+       Report::Error (sformat (_("Snapshot '%1' was not found."), 
snapshot_num));
+    }
+    return ret;
+}
+
+/**
  * Describe what was done with given file between given snapshots
  * - when new is 0, meaning is 'current system'
  */
 global map GetFileModification (string file, integer old, integer new) {
 
     map ret    = $[];
-
-    string file1       = sformat ("%1/%2/snapshot%3", snapshots_path, old, 
file);
-    string file2       = sformat ("%1/%2/snapshot%3", snapshots_path, new, 
file);
+    string file1       = sformat ("%1%2", GetSnapshotPath (old), file);
+    string file2       = sformat ("%1%2", GetSnapshotPath (new), file);
     if (new == 0)
        file2   = file;
 
@@ -270,7 +281,7 @@
 
        UI::ChangeWidget (`id (`progress ), `Value, progress);
 
-       string orig     = sformat ("%1/%2/snapshot", snapshots_path, 
snapshot_num) + file;
+       string orig     = GetSnapshotPath (snapshot_num) + file;
 
        string dir      = substring (file, 0, findlastof (file, "/"));
        if (!FileUtils::Exists (orig))


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



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to