From: DongHun Kwak Date: Tue, 1 Nov 2016 02:08:51 +0000 (+0900) Subject: Imported Upstream version 15.21.6 X-Git-Tag: upstream/16.3.1~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=202fbe881659acccaf280cdce65f4de29a9215b2;p=platform%2Fupstream%2Flibzypp.git Imported Upstream version 15.21.6 Change-Id: Icc2e646857ec7d2fcdc590c9cbce468691a792bd Signed-off-by: DongHun Kwak --- diff --git a/VERSION.cmake b/VERSION.cmake index 9199a2267..04cfc404c 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -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) #======= diff --git a/package/libzypp.changes b/package/libzypp.changes index a4dcd7ad4..59e2b09f7 100644 --- a/package/libzypp.changes +++ b/package/libzypp.changes @@ -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 diff --git a/zypp/DiskUsageCounter.cc b/zypp/DiskUsageCounter.cc index f1466bb87..d9ea27e71 100644 --- a/zypp/DiskUsageCounter.cc +++ b/zypp/DiskUsageCounter.cc @@ -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; } } diff --git a/zypp/RepoManager.cc b/zypp/RepoManager.cc index 1947f1550..f83e403e6 100644 --- a/zypp/RepoManager.cc +++ b/zypp/RepoManager.cc @@ -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(); diff --git a/zypp/target/rpm/RpmDb.cc b/zypp/target/rpm/RpmDb.cc index 4376eb43a..2c2839d03 100644 --- a/zypp/target/rpm/RpmDb.cc +++ b/zypp/target/rpm/RpmDb.cc @@ -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; }