Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2016-01-28 17:18:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp" Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2016-01-05 09:40:45.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2016-01-28 17:18:10.000000000 +0100 @@ -1,0 +2,23 @@ +Thu Jan 21 01:13:29 CET 2016 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- +Wed Jan 20 17:12:42 CET 2016 - [email protected] + +- Filter unwanted btrfs subvolumes (fixes #54, closes #55, bnc#949945) +- RepoInfo: Provide access to repo content keywords +- Build with boost-1.60.0 +- version 15.21.0 (19) + +------------------------------------------------------------------- +Thu Jan 14 01:13:17 CET 2016 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- +Thu Jan 7 01:13:28 CET 2016 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- Old: ---- libzypp-15.20.0.tar.bz2 New: ---- libzypp-15.21.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.2uo3u8/_old 2016-01-28 17:18:11.000000000 +0100 +++ /var/tmp/diff_new_pack.2uo3u8/_new 2016-01-28 17:18:11.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libzypp # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define force_gcc_46 0 Name: libzypp -Version: 15.20.0 +Version: 15.21.0 Release: 0 Url: git://gitorious.org/opensuse/libzypp.git Summary: Package, Patch, Pattern, and Product Management ++++++ libzypp-15.20.0.tar.bz2 -> libzypp-15.21.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.20.0/VERSION.cmake new/libzypp-15.21.0/VERSION.cmake --- old/libzypp-15.20.0/VERSION.cmake 2015-12-11 19:08:57.000000000 +0100 +++ new/libzypp-15.21.0/VERSION.cmake 2016-01-20 17:18:35.000000000 +0100 @@ -60,9 +60,9 @@ # SET(LIBZYPP_MAJOR "15") SET(LIBZYPP_COMPATMINOR "19") -SET(LIBZYPP_MINOR "20") +SET(LIBZYPP_MINOR "21") SET(LIBZYPP_PATCH "0") # -# LAST RELEASED: 15.20.0 (19) +# LAST RELEASED: 15.21.0 (19) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.20.0/package/libzypp.changes new/libzypp-15.21.0/package/libzypp.changes --- old/libzypp-15.20.0/package/libzypp.changes 2015-12-24 01:18:47.000000000 +0100 +++ new/libzypp-15.21.0/package/libzypp.changes 2016-01-21 01:18:12.000000000 +0100 @@ -1,4 +1,27 @@ ------------------------------------------------------------------- +Thu Jan 21 01:13:29 CET 2016 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- +Wed Jan 20 17:12:42 CET 2016 - [email protected] + +- Filter unwanted btrfs subvolumes (fixes #54, closes #55, bnc#949945) +- RepoInfo: Provide access to repo content keywords +- Build with boost-1.60.0 +- version 15.21.0 (19) + +------------------------------------------------------------------- +Thu Jan 14 01:13:17 CET 2016 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- +Thu Jan 7 01:13:28 CET 2016 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- Thu Dec 24 01:13:13 CET 2015 - [email protected] - Update zypp-po.tar.bz2 Files old/libzypp-15.20.0/po/zypp-po.tar.bz2 and new/libzypp-15.21.0/po/zypp-po.tar.bz2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.20.0/tests/zypp/Arch_test.cc new/libzypp-15.21.0/tests/zypp/Arch_test.cc --- old/libzypp-15.20.0/tests/zypp/Arch_test.cc 2015-07-06 11:06:37.000000000 +0200 +++ new/libzypp-15.21.0/tests/zypp/Arch_test.cc 2016-01-18 12:07:16.000000000 +0100 @@ -11,12 +11,10 @@ #include "zypp/Arch.h" // Boost.Test -#include <boost/test/floating_point_comparison.hpp> #include <boost/test/auto_unit_test.hpp> using boost::unit_test::test_suite; using boost::unit_test::test_case; -using boost::test_tools::close_at_tolerance; using namespace std; using namespace zypp; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.20.0/tests/zypp/Capabilities_test.cc new/libzypp-15.21.0/tests/zypp/Capabilities_test.cc --- old/libzypp-15.20.0/tests/zypp/Capabilities_test.cc 2015-07-06 11:06:37.000000000 +0200 +++ new/libzypp-15.21.0/tests/zypp/Capabilities_test.cc 2016-01-18 12:07:16.000000000 +0100 @@ -6,7 +6,6 @@ #include <string> // Boost.Test -#include <boost/test/floating_point_comparison.hpp> #include <boost/test/auto_unit_test.hpp> #include "TestSetup.h" @@ -16,7 +15,6 @@ using boost::unit_test::test_suite; using boost::unit_test::test_case; -using boost::test_tools::close_at_tolerance; using namespace std; using namespace zypp; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.20.0/zypp/DiskUsageCounter.cc new/libzypp-15.21.0/zypp/DiskUsageCounter.cc --- old/libzypp-15.20.0/zypp/DiskUsageCounter.cc 2015-07-06 11:06:37.000000000 +0200 +++ new/libzypp-15.21.0/zypp/DiskUsageCounter.cc 2016-01-21 14:08:43.000000000 +0100 @@ -127,6 +127,9 @@ { DiskUsageCounter::MountPointSet ret; + typedef std::map<std::string, MountPoint> Btrfsfilter; + Btrfsfilter btrfsfilter; // see btrfs hack below + std::ifstream procmounts( "/proc/mounts" ); if ( !procmounts ) { @@ -213,7 +216,7 @@ // const char * mpunwanted[] = { "/mnt", "/media", "/mounts", "/floppy", "/cdrom", - "/suse", "/var/tmp", "/var/adm/mount", "/var/adm/YaST", + "/suse", "/tmp", "/var/tmp", "/var/adm/mount", "/var/adm/YaST", /*last*/0/*entry*/ }; @@ -252,8 +255,10 @@ // // check for snapshotting btrfs // + bool btrfshack = false; if ( words[2] == "btrfs" ) { + btrfshack = true; if ( geteuid() != 0 ) { DBG << "Assume snapshots on " << words[1] << ": non-root user can't check" << std::endl; @@ -292,6 +297,25 @@ DBG << "Filter zero-sized mount point : " << l << std::endl; continue; } + if ( btrfshack ) + { + // HACK: + // Collect just the top/1st mountpoint of each btrfs volume + // (by device). This filters away nested subvolumes + // which otherwise break per package disk usage computation. + // FIX: Computation must learn to handle multiple mount points + // contributing to the same file system. + MountPoint & bmp( btrfsfilter[words[0]] ); + if ( bmp.fstype.empty() ) // 1st occurance + { + bmp = DiskUsageCounter::MountPoint( mp, words[2], sb.f_bsize, + ((long long)sb.f_blocks)*sb.f_bsize/1024, + ((long long)(sb.f_blocks - sb.f_bfree))*sb.f_bsize/1024, 0LL, hints ); + } + else if ( bmp.dir > mp ) + bmp.dir = mp; + continue; + } ret.insert( DiskUsageCounter::MountPoint( mp, words[2], sb.f_bsize, ((long long)sb.f_blocks)*sb.f_bsize/1024, ((long long)(sb.f_blocks - sb.f_bfree))*sb.f_bsize/1024, 0LL, hints ) ); @@ -300,6 +324,10 @@ } } + // collect filtered btrfs volumes + for ( auto && bmp : btrfsfilter ) + ret.insert( std::move(bmp.second) ); + return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.20.0/zypp/RepoInfo.cc new/libzypp-15.21.0/zypp/RepoInfo.cc --- old/libzypp-15.20.0/zypp/RepoInfo.cc 2015-10-29 15:58:02.000000000 +0100 +++ new/libzypp-15.21.0/zypp/RepoInfo.cc 2016-01-20 17:12:43.000000000 +0100 @@ -94,15 +94,18 @@ { return !emptybaseurls && !_baseUrls.empty(); } + const std::set<std::string> & contentKeywords() const + { hasContent()/*init if not yet done*/; return _keywords.second; } + void addContent( const std::string & keyword_r ) - { _keywords.insert( keyword_r ); } + { _keywords.second.insert( keyword_r ); if ( ! hasContent() ) _keywords.first = true; } - bool hasContent( const std::string & keyword_r ) const + bool hasContent() const { - if ( _keywords.empty() && ! metadatapath.empty() ) + if ( !_keywords.first && ! metadatapath.empty() ) { // HACK directly check master index file until RepoManager offers - // some content probing ans zypepr uses it. + // some content probing and zypper uses it. ///////////////////////////////////////////////////////////////// MIL << "Empty keywords...." << metadatapath << endl; Pathname master; @@ -112,10 +115,10 @@ xml::Reader reader( master ); while ( reader.seekToNode( 2, "content" ) ) { - _keywords.insert( reader.nodeText().asString() ); + _keywords.second.insert( reader.nodeText().asString() ); reader.seekToEndNode( 2, "content" ); } - _keywords.insert( "" ); // valid content in _keywords even if empty + _keywords.first = true; // valid content in _keywords even if empty } else if ( PathInfo( (master=metadatapath/"/content") ).isFile() ) { @@ -129,19 +132,22 @@ if ( str::split( line_r, std::back_inserter(words) ) > 1 && words[0].length() == 12 /*"REPOKEYWORDS"*/ ) { - this->_keywords.insert( ++words.begin(), words.end() ); + this->_keywords.second.insert( ++words.begin(), words.end() ); } return true; // mult. occurrances are ok. } return( ! str::startsWith( line_r, "META " ) ); // no need to parse into META section. } ); - _keywords.insert( "" ); + _keywords.first = true; // valid content in _keywords even if empty } ///////////////////////////////////////////////////////////////// } - return( _keywords.find( keyword_r ) != _keywords.end() ); + return _keywords.first; } + bool hasContent( const std::string & keyword_r ) const + { return( hasContent() && _keywords.second.find( keyword_r ) != _keywords.second.end() ); } + /** Signature check result needs to be stored/retrieved from _metadatapath. * Don't call them from outside validRepoSignature/setValidRepoSignature */ @@ -223,7 +229,7 @@ private: mutable RepoVariablesReplacedUrlList _baseUrls; - mutable std::set<std::string> _keywords; + mutable std::pair<FalseBool, std::set<std::string> > _keywords; friend Impl * rwcowClone<Impl>( const Impl * rhs ); /** clone for RWCOW_pointer */ @@ -423,10 +429,15 @@ bool RepoInfo::baseUrlSet() const { return _pimpl->baseurl2dump(); } + const std::set<std::string> & RepoInfo::contentKeywords() const + { return _pimpl->contentKeywords(); } void RepoInfo::addContent( const std::string & keyword_r ) { _pimpl->addContent( keyword_r ); } + bool RepoInfo::hasContent() const + { return _pimpl->hasContent(); } + bool RepoInfo::hasContent( const std::string & keyword_r ) const { return _pimpl->hasContent( keyword_r ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-15.20.0/zypp/RepoInfo.h new/libzypp-15.21.0/zypp/RepoInfo.h --- old/libzypp-15.20.0/zypp/RepoInfo.h 2015-10-29 15:42:03.000000000 +0100 +++ new/libzypp-15.21.0/zypp/RepoInfo.h 2016-01-20 17:12:43.000000000 +0100 @@ -347,6 +347,10 @@ */ void setTargetDistribution(const std::string & targetDistribution); + + /** Content keywords defined. */ + const std::set<std::string> & contentKeywords() const; + /** Add content keywords */ void addContent( const std::string & keyword_r ); /** \overload add keywords from container */ @@ -359,11 +363,11 @@ { addContentFrom( container_r.begin(), container_r.end() ); } /** Check for content keywords. - * Checking for an empty string returns whether content kewords are - * known at all. They may be missing due to missing metadata in disabled - * repos. + * They may be missing due to missing metadata in disabled repos. */ - bool hasContent( const std::string & keyword_r = std::string() ) const; + bool hasContent() const; + /** \overload check for a keywords being present */ + bool hasContent( const std::string & keyword_r ) const; /** \overload check for \b all keywords being present */ template <class TIterator> bool hasContentAll( TIterator begin_r, TIterator end_r ) const
