Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libstorage-ng for openSUSE:Factory checked in at 2022-09-14 13:44:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Wed Sep 14 13:44:41 2022 rev:182 rq:1003327 version:4.5.45 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2022-09-13 15:07:40.608353356 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.2083/libstorage-ng.changes 2022-09-14 13:44:49.673870956 +0200 @@ -1,0 +2,7 @@ +Tue Sep 13 13:34:04 UTC 2022 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#898 +- allow blkid to exit with exit status 2 (bsc#1203285) +- 4.5.45 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.5.44.tar.xz New: ---- libstorage-ng-4.5.45.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.YXdFuC/_old 2022-09-14 13:44:50.149872154 +0200 +++ /var/tmp/diff_new_pack.YXdFuC/_new 2022-09-14 13:44:50.153872164 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.5.44 +Version: 4.5.45 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.5.44.tar.xz -> libstorage-ng-4.5.45.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.44/VERSION new/libstorage-ng-4.5.45/VERSION --- old/libstorage-ng-4.5.44/VERSION 2022-09-09 23:13:17.000000000 +0200 +++ new/libstorage-ng-4.5.45/VERSION 2022-09-13 15:34:04.000000000 +0200 @@ -1 +1 @@ -4.5.44 +4.5.45 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.44/storage/SystemInfo/CmdBlkid.cc new/libstorage-ng-4.5.45/storage/SystemInfo/CmdBlkid.cc --- old/libstorage-ng-4.5.44/storage/SystemInfo/CmdBlkid.cc 2022-09-09 23:13:17.000000000 +0200 +++ new/libstorage-ng-4.5.45/storage/SystemInfo/CmdBlkid.cc 2022-09-13 15:34:04.000000000 +0200 @@ -21,8 +21,8 @@ */ -#include <algorithm> #include <ctype.h> +#include <algorithm> #include <boost/algorithm/string.hpp> #include "storage/Utils/AppUtil.h" @@ -41,7 +41,12 @@ Blkid::Blkid() { - SystemCmd cmd(BLKID_BIN " -c '" DEV_NULL_FILE "'", SystemCmd::DoThrow); + SystemCmd::Options options(BLKID_BIN " -c '" DEV_NULL_FILE "'", SystemCmd::DoThrow); + + // If blkid does not find anything it returns 2 (see bsc #1203285). + options.verify = [](int exit_code) { return exit_code == 0 || exit_code == 2; }; + + SystemCmd cmd(options); parse(cmd.stdout()); } @@ -49,7 +54,10 @@ Blkid::Blkid(const string& device) { - SystemCmd cmd(BLKID_BIN " -c '" DEV_NULL_FILE "' " + quote(device), SystemCmd::DoThrow); + SystemCmd::Options options(BLKID_BIN " -c '" DEV_NULL_FILE "' " + quote(device), SystemCmd::DoThrow); + options.verify = [](int exit_code) { return exit_code == 0 || exit_code == 2; }; + + SystemCmd cmd(options); parse(cmd.stdout()); } @@ -60,14 +68,14 @@ { data.clear(); - for (vector<string>::const_iterator it = lines.begin(); it != lines.end(); ++it) + for (const string& line : lines) { - string::size_type pos = it->find(": "); + string::size_type pos = line.find(": "); if (pos == string::npos) continue; - string device = string(*it, 0, pos); - list<string> l = split_line(string(*it, pos + 1)); + string device = string(line, 0, pos); + list<string> l = split_line(string(line, pos + 1)); Entry entry;