Hello community,
here is the log from the commit of package yast2-pkg-bindings for
openSUSE:Factory checked in at 2014-09-24 13:08:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-pkg-bindings"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes
2014-09-10 17:02:06.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new/yast2-pkg-bindings.changes
2014-09-24 13:09:01.000000000 +0200
@@ -1,0 +2,8 @@
+Tue Sep 16 19:36:50 UTC 2014 - [email protected]
+
+- SetTargetDU(): added new options ("growonly" and "filesystem")
+ to better handle Btrfs snapshots in disk usage counting
+ (part of bnc#896176)
+- 3.1.19
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-3.1.18.tar.bz2
New:
----
yast2-pkg-bindings-3.1.19.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.kYGiQx/_old 2014-09-24 13:09:02.000000000 +0200
+++ /var/tmp/diff_new_pack.kYGiQx/_new 2014-09-24 13:09:02.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings-devel-doc
-Version: 3.1.18
+Version: 3.1.19
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-pkg-bindings-%{version}.tar.bz2
@@ -28,7 +28,7 @@
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libxslt
-BuildRequires: libzypp-devel >= 6.10.0
+BuildRequires: libzypp-devel >= 14.29.0
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.kYGiQx/_old 2014-09-24 13:09:02.000000000 +0200
+++ /var/tmp/diff_new_pack.kYGiQx/_new 2014-09-24 13:09:02.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 3.1.18
+Version: 3.1.19
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -27,7 +27,7 @@
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libxslt
-BuildRequires: libzypp-devel >= 14.12.0
+BuildRequires: libzypp-devel >= 14.29.0
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
++++++ yast2-pkg-bindings-3.1.18.tar.bz2 -> yast2-pkg-bindings-3.1.19.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-3.1.18/package/yast2-pkg-bindings-devel-doc.spec
new/yast2-pkg-bindings-3.1.19/package/yast2-pkg-bindings-devel-doc.spec
--- old/yast2-pkg-bindings-3.1.18/package/yast2-pkg-bindings-devel-doc.spec
2014-09-09 14:46:22.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.19/package/yast2-pkg-bindings-devel-doc.spec
2014-09-22 12:07:17.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2-pkg-bindings-devel-doc
-Version: 3.1.18
+Version: 3.1.19
Release: 0
License: GPL-2.0
Group: Documentation/HTML
@@ -29,7 +29,7 @@
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libxslt
-BuildRequires: libzypp-devel >= 6.10.0
+BuildRequires: libzypp-devel >= 14.29.0
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-3.1.18/package/yast2-pkg-bindings.changes
new/yast2-pkg-bindings-3.1.19/package/yast2-pkg-bindings.changes
--- old/yast2-pkg-bindings-3.1.18/package/yast2-pkg-bindings.changes
2014-09-09 14:46:22.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.19/package/yast2-pkg-bindings.changes
2014-09-22 12:07:17.000000000 +0200
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Tue Sep 16 19:36:50 UTC 2014 - [email protected]
+
+- SetTargetDU(): added new options ("growonly" and "filesystem")
+ to better handle Btrfs snapshots in disk usage counting
+ (part of bnc#896176)
+- 3.1.19
+
+-------------------------------------------------------------------
Tue Sep 9 11:08:56 UTC 2014 - [email protected]
- do not hide libzypp exceptions in Pkg::ResolvableProperties()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-pkg-bindings-3.1.18/package/yast2-pkg-bindings.spec
new/yast2-pkg-bindings-3.1.19/package/yast2-pkg-bindings.spec
--- old/yast2-pkg-bindings-3.1.18/package/yast2-pkg-bindings.spec
2014-09-09 14:46:22.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.19/package/yast2-pkg-bindings.spec
2014-09-22 12:07:17.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 3.1.18
+Version: 3.1.19
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -30,7 +30,7 @@
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libxslt
-BuildRequires: libzypp-devel >= 14.12.0
+BuildRequires: libzypp-devel >= 14.29.0
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools >= 3.1.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-pkg-bindings-3.1.18/src/Target_DU.cc
new/yast2-pkg-bindings-3.1.19/src/Target_DU.cc
--- old/yast2-pkg-bindings-3.1.18/src/Target_DU.cc 2014-08-19
09:51:12.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.19/src/Target_DU.cc 2014-09-17
14:35:11.000000000 +0200
@@ -191,7 +191,12 @@
* parameter: [ $["name":"directory",
* "free":int_free,
* "used":int_used,
- * "readonly":bool] ]
+ * "filesystem":string (file system type ("ext4", "btrfs", ...),
optional),
+ * "readonly":bool (read only file system flag , optional),
+ * "growonly":bool (grow only flag, set true if the fs can only
grow,
+ * e.g. the old files will still take the space at package
upgrage
+ * because they are part of a snapshot)
+ * ] ]
*
* </code>
* @param list<map> param
@@ -215,10 +220,10 @@
bool good = true;
YCPMap partmap;
std::string dname;
- long long bsize = 4096LL;
+ std::string filesystem;
long long dfree = 0LL;
long long dused = 0LL;
- bool readonly = false;
+ zypp::DiskUsageCounter::MountPoint::HintFlags flags =
zypp::DiskUsageCounter::MountPoint::NoHint;
if (dirlist->value(i)->isMap())
{
@@ -267,11 +272,28 @@
if (good
&& !partmap->value(YCPString("readonly")).isNull()
- && partmap->value(YCPString("readonly"))->isBoolean())
+ && partmap->value(YCPString("readonly"))->isBoolean()
+ && partmap->value(YCPString("readonly"))->asBoolean()->value())
{
- readonly =
partmap->value(YCPString("readonly"))->asBoolean()->value();
+ y2milestone("Setting read only flag");
+ flags = flags | zypp::DiskUsageCounter::MountPoint::Hint_readonly;
+ }
+
+ if (good
+ && !partmap->value(YCPString("growonly")).isNull()
+ && partmap->value(YCPString("growonly"))->isBoolean()
+ && partmap->value(YCPString("growonly"))->asBoolean()->value())
+ {
+ y2milestone("Setting grow only flag");
+ flags = flags | zypp::DiskUsageCounter::MountPoint::Hint_growonly;
+ }
+
+ if (good
+ && !partmap->value(YCPString("filesystem")).isNull()
+ && partmap->value(YCPString("filesystem"))->isString())
+ {
+ filesystem =
partmap->value(YCPString("filesystem"))->asString()->value();
}
- // else: optional arg, using default
if (!good)
{
@@ -281,10 +303,18 @@
y2milestone("Adding %s", dname.c_str());
- long long dirsize = dfree + dused;
+ long long totalsize = dfree + dused;
+
+ // use 4kiB blocks (libzypp default is 0 meaning "do not care",
+ // 4kiB is the usual block size on the most systems so this should
result
+ // in more precise disk usage counting)
+ long long blocksize = 4096LL;
+ // initialize current package usage to zero, this will be overwritten
+ // when counting the actual disk usage
+ long long pkg_size = 0LL;
+ zypp::DiskUsageCounter::MountPoint mpoint(dname, filesystem, blocksize,
+ totalsize, dused, pkg_size, flags);
- // pkg_size is 0
- zypp::DiskUsageCounter::MountPoint mpoint(dname, bsize, dirsize, dused,
0LL, readonly);
mount_points.insert(mpoint);
}
@@ -292,8 +322,12 @@
{
zypp_ptr()->setPartitions(mount_points);
}
- catch (...)
+ catch(const zypp::Exception &excpt)
{
+ y2error("Setting disk usage failed: %s", excpt.asString().c_str());
+ _last_error.setLastError(ExceptionAsString(excpt));
+ // TODO FIXME: change return type to boolean to allow error reporting
+ return YCPVoid();
}
return YCPVoid();
@@ -342,12 +376,13 @@
dirmap = MPS2YCPMap(mps);
}
- catch (...)
+ catch(const zypp::Exception &excpt)
{
+ y2error("Reading disk usage failed: %s", excpt.asString().c_str());
+ _last_error.setLastError(ExceptionAsString(excpt));
+ return YCPVoid();
}
return dirmap;
}
-
-
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]