Imported Upstream version 15.21.6 98/94698/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 02:08:51 +0000 (11:08 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 02:08:52 +0000 (11:08 +0900)
Change-Id: Icc2e646857ec7d2fcdc590c9cbce468691a792bd
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
package/libzypp.changes
zypp/DiskUsageCounter.cc
zypp/RepoManager.cc
zypp/target/rpm/RpmDb.cc

index 9199a22676dc19b8e8a32e35576fa3899b62cba5..04cfc404c4f9c47c07418205316e16b4fabc754b 100644 (file)
@@ -61,8 +61,8 @@
 SET(LIBZYPP_MAJOR "15")
 SET(LIBZYPP_COMPATMINOR "19")
 SET(LIBZYPP_MINOR "21")
-SET(LIBZYPP_PATCH "5")
+SET(LIBZYPP_PATCH "6")
 #
-# LAST RELEASED: 15.21.5 (19)
+# LAST RELEASED: 15.21.6 (19)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index a4dcd7ad41e3696ae203384b2d2bd52d970461ec..59e2b09f79ea0845eaa7fc1dd554ea790f3a7ad6 100644 (file)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Fri Apr 15 11:31:08 CEST 2016 - ma@suse.de
+
+- DiskUsageCounter: Limit estimated waste per file (bsc#974275)
+- version 15.21.6 (19)
+
 -------------------------------------------------------------------
 Fri Mar 18 13:37:22 CET 2016 - ma@suse.de
 
index f1466bb877fc1e5446e39f7d90c02c1c668fd5c4..d9ea27e714214fc63f958a28bb251104107fc418 100644 (file)
@@ -71,10 +71,13 @@ namespace zypp
         unsigned idx = 0;
         for_( it, result.begin(), result.end() )
         {
-          static const ByteCount blockAdjust( 2, ByteCount::K ); // (files * blocksize) / (2 * 1K)
+         // Limit estimated waste (half block per file) as it does not apply to
+         // btrfs, which reports up to 64K blocksize (bsc#974275,bsc#965322)
+         static const ByteCount blockAdjust( 2, ByteCount::K ); // (files * blocksize) / 2 / 1K; result value in K!
+
           it->pkg_size = it->used_size          // current usage
                        + duchanges[idx].kbytes  // package data size
-                       + ( duchanges[idx].files * it->block_size / blockAdjust ); // half block per file
+                       + ( duchanges[idx].files * ( it->fstype == "btrfs" ? 4096 : it->block_size ) / blockAdjust ); // half block per file
           ++idx;
         }
       }
index 1947f1550ce8b2804c3100132f8dbcc580ccdeb0..f83e403e6fba9e5e3c21720ebaa844515405dd75 100644 (file)
@@ -1972,7 +1972,7 @@ namespace zypp
     assert_url( service );
     MIL << "Going to refresh service '" << service.alias() <<  "', url: " << service.url() << ", opts: " << options_r << endl;
 
-    if ( service.ttl() && !options_r.testFlag( RefreshService_forceRefresh ) )
+    if ( service.ttl() && !( options_r.testFlag( RefreshService_forceRefresh) || options_r.testFlag( RefreshService_restoreStatus ) ) )
     {
       // Service defines a TTL; maybe we can re-use existing data without refresh.
       Date lrf = service.lrf();
index 4376eb43a1a661aea44e63385ca1a7e73a0e66a6..2c2839d0364718f98d6a1416ffde8fa162b32adc 100644 (file)
@@ -1525,7 +1525,8 @@ RpmDb::CheckPackageResult RpmDb::checkPackage( const Pathname & path_r, CheckPac
 
   if ( res == 0 )
   {
-    detail_r.push_back( CheckPackageDetail::value_type( CHK_OK, std::move(vresult) ) );
+    // remove trailing NL!
+    detail_r.push_back( CheckPackageDetail::value_type( CHK_OK, str::rtrim( std::move(vresult) ) ) );
     return CHK_OK;
   }