Hello community,

here is the log from the commit of package libstorage for openSUSE:Factory 
checked in at 2015-08-27 08:54:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage/libstorage.changes    2015-07-25 
07:43:07.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage.new/libstorage.changes       
2015-08-27 08:54:20.000000000 +0200
@@ -1,0 +2,21 @@
+Tue Aug 25 13:50:31 CEST 2015 - [email protected]
+
+- Properly initialize _doThrow flag in SystemCmd default constructor
+- Catch exception if boot.quota command not found (bsc#942324)
+- 2.25.29 
+
+-------------------------------------------------------------------
+Thu Aug 20 14:40:35 CEST 2015 - [email protected]
+
+- Handle 'command not found' for /sbin/btrfs gracefully (bsc#936710)
+- New exception class CommandNotFoundException for the general case
+- 2.25.28 
+
+-------------------------------------------------------------------
+Wed Jul 22 17:15:17 CEST 2015 - [email protected]
+
+- Don't throw exception for all kinds of parted stderr output
+  (bnc#938561, bnc#938572)
+- 2.25.27
+
+-------------------------------------------------------------------

Old:
----
  libstorage-2.25.26.tar.bz2

New:
----
  libstorage-2.25.29.tar.bz2

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

Other differences:
------------------
++++++ libstorage.spec ++++++
--- /var/tmp/diff_new_pack.cM0PsL/_old  2015-08-27 08:54:21.000000000 +0200
+++ /var/tmp/diff_new_pack.cM0PsL/_new  2015-08-27 08:54:21.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           libstorage
-Version:        2.25.26
+Version:        2.25.29
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source:         libstorage-%{version}.tar.bz2

++++++ libstorage-2.25.26.tar.bz2 -> libstorage-2.25.29.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/VERSION 
new/libstorage-2.25.29/VERSION
--- old/libstorage-2.25.26/VERSION      2015-07-17 12:47:43.000000000 +0200
+++ new/libstorage-2.25.29/VERSION      2015-08-25 13:50:16.000000000 +0200
@@ -1 +1 @@
-2.25.26
+2.25.29
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/bindings/python/storage.py 
new/libstorage-2.25.29/bindings/python/storage.py
--- old/libstorage-2.25.26/bindings/python/storage.py   2015-07-10 
12:48:13.000000000 +0200
+++ new/libstorage-2.25.29/bindings/python/storage.py   2015-08-25 
13:29:49.000000000 +0200
@@ -1,5 +1,5 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 3.0.5
+# Version 3.0.7
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
@@ -2627,6 +2627,9 @@
 _storage.CHATTR_FAILED_swigconstant(_storage)
 CHATTR_FAILED = _storage.CHATTR_FAILED
 
+_storage.QUOTA_RESTART_FAILED_swigconstant(_storage)
+QUOTA_RESTART_FAILED = _storage.QUOTA_RESTART_FAILED
+
 _storage.CONTAINER_INTERNAL_ERROR_swigconstant(_storage)
 CONTAINER_INTERNAL_ERROR = _storage.CONTAINER_INTERNAL_ERROR
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/libstorage.spec.in 
new/libstorage-2.25.29/libstorage.spec.in
--- old/libstorage-2.25.26/libstorage.spec.in   2015-07-10 11:02:43.000000000 
+0200
+++ new/libstorage-2.25.29/libstorage.spec.in   2015-07-23 15:36:11.000000000 
+0200
@@ -26,8 +26,16 @@
 
 Prefix:         /usr
 
-BuildRequires:  boost-devel dejagnu doxygen gcc-c++ libtool libxml2-devel 
python-devel swig
-BuildRequires: ruby ruby-devel
+BuildRequires: boost-devel
+BuildRequires: dejagnu
+BuildRequires: doxygen
+BuildRequires: gcc-c++
+BuildRequires: libtool
+BuildRequires: libxml2-devel
+BuildRequires: python-devel
+BuildRequires: swig
+BuildRequires: ruby
+BuildRequires: ruby-devel
 
 Summary:        Library for storage management
 Url:            http://en.opensuse.org/Portal:Libstorage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/storage/BtrfsCo.cc 
new/libstorage-2.25.29/storage/BtrfsCo.cc
--- old/libstorage-2.25.26/storage/BtrfsCo.cc   2015-07-10 11:02:43.000000000 
+0200
+++ new/libstorage-2.25.29/storage/BtrfsCo.cc   2015-08-20 15:13:29.000000000 
+0200
@@ -31,6 +31,7 @@
 #include "storage/Utils/AppUtil.h"
 #include "storage/Storage.h"
 #include "storage/StorageDefines.h"
+#include "storage/Utils/SystemCmd.h"
 
 
 namespace storage
@@ -49,7 +50,16 @@
        : Container(s, "btrfs", "/dev/btrfs", staticType(), systeminfo)
     {
        y2deb("constructing BtrfsCo");
-       getBtrfsData(systeminfo);
+
+       try
+       {
+           getBtrfsData(systeminfo);
+       }
+       catch ( const CommandNotFoundException & ex )
+       {
+           ST_CAUGHT( ex );
+           y2war( "Package with command \"" << ex.cmd() << "\" not installed?" 
);
+       }
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/storage/StorageInterface.h 
new/libstorage-2.25.29/storage/StorageInterface.h
--- old/libstorage-2.25.26/storage/StorageInterface.h   2015-07-10 
11:02:43.000000000 +0200
+++ new/libstorage-2.25.29/storage/StorageInterface.h   2015-08-25 
13:16:04.000000000 +0200
@@ -967,6 +967,7 @@
        TMPFS_REMOVE_NOT_FOUND = -16003,
 
        CHATTR_FAILED = -17001,
+       QUOTA_RESTART_FAILED = -17002,
 
        CONTAINER_INTERNAL_ERROR = -99000,
        CONTAINER_INVALID_VIRTUAL_CALL = -99001,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/storage/SystemInfo/CmdParted.cc 
new/libstorage-2.25.29/storage/SystemInfo/CmdParted.cc
--- old/libstorage-2.25.26/storage/SystemInfo/CmdParted.cc      2015-07-10 
11:02:43.000000000 +0200
+++ new/libstorage-2.25.29/storage/SystemInfo/CmdParted.cc      2015-07-23 
10:29:54.000000000 +0200
@@ -53,9 +53,24 @@
 
        if ( !cmd.stderr().empty() )
        {
-           // suppress complaints about "unrecognised disk label" (might be an 
empty disk)
-           if ( ! boost::ends_with( cmd.stderr().front(), "unrecognised disk 
label" ) )
+           this->stderr = cmd.stderr(); // Save stderr output
+
+           if ( boost::starts_with( cmd.stderr().front(), "Error: Could not 
stat device" ) )
                ST_THROW( SystemCmdException( &cmd, "parted complains: " + 
cmd.stderr().front() ) );
+           else
+           {
+               // Intentionally NOT throwing an exception here for just any 
kind
+               // of stderr output because it's quite common for the parted
+               // command to write messages to stderr in certain situations 
that
+               // may not necessarily be fatal.
+               //
+               // See also bsc#938572, bsc#938561
+
+               for ( string line: stderr )
+               {
+                   y2war( "parted stderr> " + line );
+               }
+           }
        }
 
        parse( cmd.stdout() );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/storage/SystemInfo/CmdParted.h 
new/libstorage-2.25.29/storage/SystemInfo/CmdParted.h
--- old/libstorage-2.25.26/storage/SystemInfo/CmdParted.h       2015-07-10 
11:02:43.000000000 +0200
+++ new/libstorage-2.25.29/storage/SystemInfo/CmdParted.h       2015-07-23 
10:29:54.000000000 +0200
@@ -115,6 +115,19 @@
         */
        void parse(const vector<string>& lines);
 
+       /**
+        * Return the stderr output of parted command.
+        *
+        * Unlike many similar classes in the SystemInfo/ directory, This class
+        * does not throw an exception whenever the underlying command (here:
+        * parted) writes any output to stderr: It is quite common for the
+        * parted command to write messages to stderr in certain situations
+        * that may not necessarily be fatal.
+        *
+        * Any stderr messages are written to the log, though.
+        */
+       const vector<string> & getStderr() const { return stderr; }
+
     private:
 
        typedef vector<Entry>::iterator iterator;
@@ -125,6 +138,8 @@
        Geometry geometry;
        bool gpt_enlarge;
        vector<Entry> entries;
+       vector<string> stderr;
+
 
        void scanDiskFlags(const string& line);
        void scanSectorSizeLine(const string& line);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/storage/Utils/SystemCmd.cc 
new/libstorage-2.25.29/storage/Utils/SystemCmd.cc
--- old/libstorage-2.25.26/storage/Utils/SystemCmd.cc   2015-07-10 
11:02:43.000000000 +0200
+++ new/libstorage-2.25.29/storage/Utils/SystemCmd.cc   2015-08-25 
13:21:38.000000000 +0200
@@ -76,7 +76,9 @@
 
 
     SystemCmd::SystemCmd()
-       : _combineOutput(false), _outputProc(NULL)
+       : _combineOutput( false ),
+         _doThrow( false ),
+         _outputProc( NULL )
     {
        y2mil("constructor SystemCmd()");
        init();
@@ -399,7 +401,7 @@
                if ( cmdRet_ret == SHELL_RET_COMMAND_NOT_EXECUTABLE )
                    ST_MAYBE_THROW( SystemCmdException( this, "Command not 
executable" ), _doThrow );
                else if ( cmdRet_ret == SHELL_RET_COMMAND_NOT_FOUND )
-                   ST_MAYBE_THROW( SystemCmdException( this, "Command not 
found" ), _doThrow );
+                   ST_MAYBE_THROW( CommandNotFoundException( this ), _doThrow 
);
                else if ( cmdRet_ret > SHELL_RET_SIGNAL )
                {
                    std::stringstream msg;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/storage/Utils/SystemCmd.h 
new/libstorage-2.25.29/storage/Utils/SystemCmd.h
--- old/libstorage-2.25.26/storage/Utils/SystemCmd.h    2015-07-10 
11:02:43.000000000 +0200
+++ new/libstorage-2.25.29/storage/Utils/SystemCmd.h    2015-08-20 
15:13:29.000000000 +0200
@@ -271,6 +271,27 @@
     };
 
 
+    /**
+     * Specialized exception class for the very common case "command not 
found".
+     * This might legally happen while probing for storage features with a
+     * command that might or might not be installed.
+     *
+     * The purpose of this class is to make this special case easily
+     * distinguishable from other error cases (command installed, but failed
+     * for some reason).
+     **/
+    class CommandNotFoundException: public SystemCmdException
+    {
+    public:
+       CommandNotFoundException( const SystemCmd * sysCmd )
+           : SystemCmdException( sysCmd, "Command not found" )
+           {}
+
+       virtual ~CommandNotFoundException() throw()
+           {}
+    };
+
+
 
     inline string quote(const string& str)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/storage/Volume.cc 
new/libstorage-2.25.29/storage/Volume.cc
--- old/libstorage-2.25.26/storage/Volume.cc    2015-07-10 11:02:43.000000000 
+0200
+++ new/libstorage-2.25.29/storage/Volume.cc    2015-08-25 13:48:11.000000000 
+0200
@@ -3236,7 +3236,6 @@
            fstab_opt!=orig_fstab_opt && !orig_fstab_opt.empty() &&
            mp==orig_mp && mp!="swap" )
        {
-           SystemCmd c;
            y2mil( "fstab_opt:" << fstab_opt << " fstab_opt_orig:" << 
orig_fstab_opt );
            y2mil( "remount:" << *this );
            int r = 0;
@@ -3252,15 +3251,29 @@
            }
            else
            {
-               c.execute(MOUNTBIN " -oremount " + quote(mp));
-               y2mil( "remount remount:" << c.retcode() );
-               if( c.retcode()!=0 )
+               SystemCmd cmd( MOUNTBIN " -oremount " + quote(mp) );
+               y2mil( "remount remount:" << cmd.retcode() );
+               if( cmd.retcode()!=0 )
                    ret = VOLUME_REMOUNT_FAILED;
            }
            if( !getStorage()->instsys() &&
                haveQuota(fstab_opt)!=haveQuota(orig_fstab_opt) )
            {
-               c.execute( "/etc/init.d/boot.quota restart" );
+               try
+               {
+                   SystemCmd cmd( "/etc/init.d/boot.quota restart", 
SystemCmd::DoThrow );
+               }
+               catch ( const CommandNotFoundException & ex )
+               {
+                   ST_CAUGHT( ex );
+                   y2war( "Package \"quota\" not installed?" );
+                   ret = QUOTA_RESTART_FAILED;
+               }
+               catch ( const SystemCmdException & ex )
+               {
+                   ST_CAUGHT( ex );
+                   ret = QUOTA_RESTART_FAILED;
+               }
            }
            if (mp == "/" && (fs == EXT3 || fs == EXT4))
            {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/storage/gen_md5sum.cc 
new/libstorage-2.25.29/storage/gen_md5sum.cc
--- old/libstorage-2.25.26/storage/gen_md5sum.cc        2015-07-17 
13:09:50.000000000 +0200
+++ new/libstorage-2.25.29/storage/gen_md5sum.cc        2015-08-25 
13:54:46.000000000 +0200
@@ -1,5 +1,5 @@
-#define SOURCES_MD5SUM   "264fff2ab6cfc86b11d75d19728c8d8d"
-#define SOURCES_MD5_DATE " Fri Jul 17 13:09:50 CEST 2015 "
+#define SOURCES_MD5SUM   "6d01865855a892f528341c9cb1325fc6"
+#define SOURCES_MD5_DATE " Di 25. Aug 13:54:46 CEST 2015 "
 namespace storage
 {
 const char* GetSourceMd5() { return SOURCES_MD5SUM; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-2.25.26/testsuite/single.out/systemcmd1.out 
new/libstorage-2.25.29/testsuite/single.out/systemcmd1.out
--- old/libstorage-2.25.26/testsuite/single.out/systemcmd1.out  2015-07-10 
11:02:43.000000000 +0200
+++ new/libstorage-2.25.29/testsuite/single.out/systemcmd1.out  2015-08-20 
15:13:29.000000000 +0200
@@ -46,7 +46,7 @@
 
 ### test_nonexistent()
 throw behaviour: DoThrow
-CAUGHT SystemCmdException: Command not found: "/bin/wrglbrmpf"
+CAUGHT CommandNotFoundException: Command not found: "/bin/wrglbrmpf"
 cmd: "/bin/wrglbrmpf"
 cmdRet: 127
 stderr:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-2.25.26/testsuite/systemcmd1.cc 
new/libstorage-2.25.29/testsuite/systemcmd1.cc
--- old/libstorage-2.25.26/testsuite/systemcmd1.cc      2015-07-10 
11:02:43.000000000 +0200
+++ new/libstorage-2.25.29/testsuite/systemcmd1.cc      2015-08-20 
15:13:29.000000000 +0200
@@ -55,6 +55,17 @@
 }
 
 
+ostream & operator<<( ostream & stream, const CommandNotFoundException & ex )
+{
+    stream << "CommandNotFoundException: " << ex.what() << endl;
+    stream << "cmd: \"" << ex.cmd() << "\"" << endl;
+    stream << "cmdRet: " << ex.cmdRet() << endl;
+    stream << "stderr:\n" << ex.stderr() << endl;
+
+    return stream;
+}
+
+
 void dump( const string & name, const SystemCmd & cmd )
 {
     cout << name << endl;
@@ -103,6 +114,10 @@
        SystemCmd cmd( "/bin/wrglbrmpf", throwBehaviour );
        cout << cmd << endl;
     }
+    catch ( const CommandNotFoundException &ex )
+    {
+       cout << "CAUGHT " << ex << endl;
+    }
     catch ( const SystemCmdException &ex )
     {
        cout << "CAUGHT " << ex << endl;
@@ -145,6 +160,10 @@
        SystemCmd cmd( "/etc/fstab", throwBehaviour );
        cout << cmd << endl;
     }
+    catch ( const CommandNotFoundException &ex )
+    {
+       cout << "CAUGHT " << ex << endl;
+    }
     catch ( const SystemCmdException &ex )
     {
        cout << "CAUGHT " << ex << endl;


Reply via email to