Hello community, here is the log from the commit of package libzypp for openSUSE:11.4 checked in at Sat Jul 23 03:09:40 CEST 2011.
-------- --- old-versions/11.4/UPDATES/all/libzypp/libzypp.changes 2011-02-14 15:03:58.000000000 +0100 +++ 11.4/libzypp/libzypp.changes 2011-05-31 10:45:33.000000000 +0200 @@ -1,0 +2,39 @@ +Tue May 31 10:29:37 CEST 2011 - [email protected] + +- Recommend 'lsof' (for zypper ps) (bnc#694427, bnc#684466) +- version 8.12.5 (10) + +------------------------------------------------------------------- +Mon May 23 16:15:51 CEST 2011 - [email protected] + +- respect patch content license when determinating interactive status +- version 8.12.4 (10) + +------------------------------------------------------------------- +Sun May 22 01:17:27 CEST 2011 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- +Wed May 18 08:46:22 CEST 2011 - [email protected] + +- Apply patch adding missing entries for Arch_armv7(n)hl. +- version 8.12.3 (10) + +------------------------------------------------------------------- +Fri Apr 29 16:05:44 CEST 2011 - [email protected] + +- also look at the file content to detect metalink files (bnc#649925) + +------------------------------------------------------------------- +Fri Apr 29 15:32:10 CEST 2011 - [email protected] + +- Fix max_concurrent_connections option in MultiCurl (bnc#596089) +- version 8.12.2 (10) + +------------------------------------------------------------------- +Mon Apr 4 15:21:54 CEST 2011 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- calling whatdependson for 11.4-i586 Old: ---- libzypp-8.12.1.tar.bz2 New: ---- libzypp-8.12.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.FU7ALh/_old 2011-07-23 00:54:46.000000000 +0200 +++ /var/tmp/diff_new_pack.FU7ALh/_new 2011-07-23 00:54:46.000000000 +0200 @@ -19,12 +19,12 @@ Name: libzypp -License: GPLv2+ +License: GPLv2 Group: System/Packages BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Package, Patch, Pattern, and Product Management -Version: 8.12.1 -Release: 4.<RELEASE5> +Version: 8.12.5 +Release: 0.<RELEASE2> Source: %{name}-%{version}.tar.bz2 Source1: %{name}-rpmlintrc Provides: yast2-packagemanager @@ -32,6 +32,8 @@ %if 0%{?suse_version} Recommends: logrotate %endif +# lsof is used for 'zypper ps': +Recommends: lsof BuildRequires: cmake BuildRequires: openssl-devel BuildRequires: libudev-devel @@ -127,7 +129,7 @@ Ladislav Slezak <[email protected]> %package devel -License: GPLv2+ + Requires: libzypp = %{version} Requires: libxml2-devel Requires: openssl-devel ++++++ libzypp-8.12.1.tar.bz2 -> libzypp-8.12.5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/VERSION.cmake new/libzypp-8.12.5/VERSION.cmake --- old/libzypp-8.12.1/VERSION.cmake 2011-02-14 14:47:32.000000000 +0100 +++ new/libzypp-8.12.5/VERSION.cmake 2011-05-31 10:37:39.000000000 +0200 @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "8") SET(LIBZYPP_COMPATMINOR "10") SET(LIBZYPP_MINOR "12") -SET(LIBZYPP_PATCH "1") +SET(LIBZYPP_PATCH "5") # -# LAST RELEASED: 8.12.1 (10) +# LAST RELEASED: 8.12.5 (10) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/libzypp.spec.cmake new/libzypp-8.12.5/libzypp.spec.cmake --- old/libzypp-8.12.1/libzypp.spec.cmake 2011-02-14 14:47:32.000000000 +0100 +++ new/libzypp-8.12.5/libzypp.spec.cmake 2011-05-31 10:37:39.000000000 +0200 @@ -11,7 +11,7 @@ # norootforbuild Name: @PACKAGE@ -License: GPLv2+ +License: GPLv2 Group: System/Packages BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Package, Patch, Pattern, and Product Management @@ -24,6 +24,8 @@ %if 0%{?suse_version} Recommends: logrotate %endif +# lsof is used for 'zypper ps': +Recommends: lsof BuildRequires: cmake BuildRequires: openssl-devel BuildRequires: libudev-devel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/package/libzypp.changes new/libzypp-8.12.5/package/libzypp.changes --- old/libzypp-8.12.1/package/libzypp.changes 2011-02-14 14:47:32.000000000 +0100 +++ new/libzypp-8.12.5/package/libzypp.changes 2011-05-31 10:37:39.000000000 +0200 @@ -1,4 +1,43 @@ ------------------------------------------------------------------- +Tue May 31 10:29:37 CEST 2011 - [email protected] + +- Recommend 'lsof' (for zypper ps) (bnc#694427, bnc#684466) +- version 8.12.5 (10) + +------------------------------------------------------------------- +Mon May 23 16:15:51 CEST 2011 - [email protected] + +- respect patch content license when determinating interactive status +- version 8.12.4 (10) + +------------------------------------------------------------------- +Sun May 22 01:17:27 CEST 2011 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- +Wed May 18 08:46:22 CEST 2011 - [email protected] + +- Apply patch adding missing entries for Arch_armv7(n)hl. +- version 8.12.3 (10) + +------------------------------------------------------------------- +Fri Apr 29 16:05:44 CEST 2011 - [email protected] + +- also look at the file content to detect metalink files (bnc#649925) + +------------------------------------------------------------------- +Fri Apr 29 15:32:10 CEST 2011 - [email protected] + +- Fix max_concurrent_connections option in MultiCurl (bnc#596089) +- version 8.12.2 (10) + +------------------------------------------------------------------- +Mon Apr 4 15:21:54 CEST 2011 - [email protected] + +- Update zypp-po.tar.bz2 + +------------------------------------------------------------------- Thu Feb 10 16:01:46 CET 2011 - [email protected] - Remove package-manager.desktop file (bnc#329635) Files old/libzypp-8.12.1/po/sle-zypp-po.tar.bz2 and new/libzypp-8.12.5/po/sle-zypp-po.tar.bz2 differ Files old/libzypp-8.12.1/po/zypp-po.tar.bz2 and new/libzypp-8.12.5/po/zypp-po.tar.bz2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/tests/sat/AttrMatcher_test.cc new/libzypp-8.12.5/tests/sat/AttrMatcher_test.cc --- old/libzypp-8.12.1/tests/sat/AttrMatcher_test.cc 2011-02-14 14:47:32.000000000 +0100 +++ new/libzypp-8.12.5/tests/sat/AttrMatcher_test.cc 2011-05-31 10:37:39.000000000 +0200 @@ -76,6 +76,7 @@ BOOST_AUTO_TEST_CASE(AttrMatcher_defaultconstructed) { sat::AttrMatcher m; + BOOST_CHECK_EQUAL( m.flags(), Match::NOTHING ); BOOST_CHECK( !m ); // eval in boolean context BOOST_CHECK( m.searchstring().empty() ); BOOST_CHECK_EQUAL( m.flags(), Match() ); @@ -89,6 +90,12 @@ BOOST_CHECK( m ); // eval in boolean context } +BOOST_AUTO_TEST_CASE(AttrMatcher_OTHER) +{ + sat::AttrMatcher m( "fau", Match::OTHER ); + BOOST_CHECK_THROW( m.compile(), MatchUnknownModeException ); +} + BOOST_AUTO_TEST_CASE(AttrMatcher_STRING) { sat::AttrMatcher m( "fau" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/zypp/Arch.cc new/libzypp-8.12.5/zypp/Arch.cc --- old/libzypp-8.12.1/zypp/Arch.cc 2011-02-14 14:47:33.000000000 +0100 +++ new/libzypp-8.12.5/zypp/Arch.cc 2011-05-31 10:37:39.000000000 +0200 @@ -426,6 +426,8 @@ const Arch Arch_sparcv8( _sparcv8 ); const Arch Arch_sparc( _sparc ); + const Arch Arch_armv7nhl ( _armv7nhl ); + const Arch Arch_armv7hl ( _armv7hl ); const Arch Arch_armv7l( _armv7l ); const Arch Arch_armv6l( _armv6l ); const Arch Arch_armv5tejl( _armv5tejl ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/zypp/Patch.cc new/libzypp-8.12.5/zypp/Patch.cc --- old/libzypp-8.12.1/zypp/Patch.cc 2011-02-14 14:47:33.000000000 +0100 +++ new/libzypp-8.12.5/zypp/Patch.cc 2011-05-31 10:37:39.000000000 +0200 @@ -102,7 +102,7 @@ Patch::Contents c( contents() ); for_( it, c.begin(), c.end() ) { - if ( ! licenseToConfirm().empty() ) + if ( ! makeResObject(*it)->licenseToConfirm().empty() ) { return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/zypp/ZConfig.cc new/libzypp-8.12.5/zypp/ZConfig.cc --- old/libzypp-8.12.1/zypp/ZConfig.cc 2011-02-14 14:47:33.000000000 +0100 +++ new/libzypp-8.12.5/zypp/ZConfig.cc 2011-05-31 10:37:39.000000000 +0200 @@ -256,7 +256,7 @@ , download_use_deltarpm ( true ) , download_use_deltarpm_always ( false ) , download_media_prefer_download( true ) - , download_max_concurrent_connections( 2 ) + , download_max_concurrent_connections( 5 ) , download_min_download_speed ( 0 ) , download_max_download_speed ( 0 ) , download_max_silent_tries ( 5 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/zypp/media/MediaCurl.cc new/libzypp-8.12.5/zypp/media/MediaCurl.cc --- old/libzypp-8.12.1/zypp/media/MediaCurl.cc 2011-02-14 14:47:33.000000000 +0100 +++ new/libzypp-8.12.5/zypp/media/MediaCurl.cc 2011-05-31 10:37:39.000000000 +0200 @@ -892,6 +892,7 @@ case CURLE_URL_MALFORMAT: case CURLE_URL_MALFORMAT_USER: err = " Bad URL"; + break; case CURLE_LOGIN_DENIED: ZYPP_THROW( MediaUnauthorizedException(url, "Login failed.", _curlError, "")); @@ -1058,7 +1059,6 @@ FILE *file = ::fopen( "/dev/null", "w" ); if ( !file ) { - ::fclose(file); ERR << "fopen failed for /dev/null" << endl; curl_easy_setopt( _curl, CURLOPT_NOBODY, 0L); curl_easy_setopt( _curl, CURLOPT_RANGE, NULL ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/zypp/media/MediaMultiCurl.cc new/libzypp-8.12.5/zypp/media/MediaMultiCurl.cc --- old/libzypp-8.12.1/zypp/media/MediaMultiCurl.cc 2011-02-14 14:47:33.000000000 +0100 +++ new/libzypp-8.12.5/zypp/media/MediaMultiCurl.cc 2011-05-31 10:37:39.000000000 +0200 @@ -154,10 +154,10 @@ double _timeout; double _connect_timeout; double _maxspeed; + int _maxworkers; }; #define BLKSIZE 131072 -#define MAXWORKERS 5 #define MAXURLS 10 @@ -805,6 +805,7 @@ _timeout = 0; _connect_timeout = 0; _maxspeed = 0; + _maxworkers = 0; if (blklist) { for (size_t blkno = 0; blkno < blklist->numBlocks(); blkno++) @@ -844,7 +845,7 @@ break; } - if (_activeworkers < MAXWORKERS && urliter != urllist.end() && _workers.size() < MAXURLS) + if (_activeworkers < _maxworkers && urliter != urllist.end() && _workers.size() < MAXURLS) { // spawn another worker! multifetchworker *worker = new multifetchworker(workerno++, *this, *urliter); @@ -1089,8 +1090,8 @@ { double avg = _fetchedsize / (now - _starttime); avg = worker->_maxspeed * _maxspeed / avg; - if (avg < _maxspeed / MAXWORKERS) - avg = _maxspeed / MAXWORKERS; + if (avg < _maxspeed / _maxworkers) + avg = _maxspeed / _maxworkers; if (avg > _maxspeed) avg = _maxspeed; if (avg < 1024) @@ -1191,6 +1192,34 @@ _customHeadersMetalink = curl_slist_append(_customHeadersMetalink, "Accept: */*, application/metalink+xml, application/metalink4+xml"); } +static bool looks_like_metalink(const Pathname & file) +{ + char buf[256], *p; + int fd, l; + if ((fd = open(file.asString().c_str(), O_RDONLY)) == -1) + return false; + while ((l = read(fd, buf, sizeof(buf) - 1)) == -1 && errno == EINTR) + ; + close(fd); + if (l == -1) + return 0; + buf[l] = 0; + p = buf; + while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n') + p++; + if (!strncasecmp(p, "<?xml", 5)) + { + while (*p && *p != '>') + p++; + if (*p == '>') + p++; + while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n') + p++; + } + bool ret = !strncasecmp(p, "<metalink", 9) ? true : false; + DBG << "looks_like_metalink(" << file << "): " << ret << endl; + return ret; +} void MediaMultiCurl::doGetFileCopy( const Pathname & filename , const Pathname & target, callback::SendReport<DownloadProgressReport> & report, RequestOptions options ) const { @@ -1275,79 +1304,95 @@ { WAR << "Could not get the reponse code." << endl; } + + bool ismetalink = false; + char *ptr = NULL; if (curl_easy_getinfo(_curl, CURLINFO_CONTENT_TYPE, &ptr) == CURLE_OK && ptr) { string ct = string(ptr); if (ct.find("application/metalink+xml") == 0 || ct.find("application/metalink4+xml") == 0) + ismetalink = true; + } + + if (!ismetalink) + { + // some proxies do not store the content type, so also look at the file to find + // out if we received a metalink (bnc#649925) + fflush(file); + if (looks_like_metalink(Pathname(destNew))) + ismetalink = true; + } + + if (ismetalink) + { + bool userabort = false; + fclose(file); + file = NULL; + Pathname failedFile = ZConfig::instance().repoCachePath() / "MultiCurl.failed"; + try + { + MetaLinkParser mlp; + mlp.parse(Pathname(destNew)); + MediaBlockList bl = mlp.getBlockList(); + vector<Url> urls = mlp.getUrls(); + DBG << bl << endl; + file = fopen(destNew.c_str(), "w+"); + if (!file) + ZYPP_THROW(MediaWriteException(destNew)); + if (PathInfo(target).isExist()) + { + DBG << "reusing blocks from file " << target << endl; + bl.reuseBlocks(file, target.asString()); + DBG << bl << endl; + } + if (bl.haveChecksum(1) && PathInfo(failedFile).isExist()) + { + DBG << "reusing blocks from file " << failedFile << endl; + bl.reuseBlocks(file, failedFile.asString()); + DBG << bl << endl; + filesystem::unlink(failedFile); + } + Pathname df = deltafile(); + if (!df.empty()) + { + DBG << "reusing blocks from file " << df << endl; + bl.reuseBlocks(file, df.asString()); + DBG << bl << endl; + } + try + { + multifetch(filename, file, &urls, &report, &bl); + } + catch (MediaCurlException &ex) + { + userabort = ex.errstr() == "User abort"; + ZYPP_RETHROW(ex); + } + } + catch (Exception &ex) { - bool userabort = false; - fclose(file); + // something went wrong. fall back to normal download + if (file) + fclose(file); file = NULL; - Pathname failedFile = ZConfig::instance().repoCachePath() / "MultiCurl.failed"; - try + if (PathInfo(destNew).size() >= 63336) { - MetaLinkParser mlp; - mlp.parse(Pathname(destNew)); - MediaBlockList bl = mlp.getBlockList(); - vector<Url> urls = mlp.getUrls(); - DBG << bl << endl; - file = fopen(destNew.c_str(), "w+"); - if (!file) - ZYPP_THROW(MediaWriteException(destNew)); - if (PathInfo(target).isExist()) - { - DBG << "reusing blocks from file " << target << endl; - bl.reuseBlocks(file, target.asString()); - DBG << bl << endl; - } - if (bl.haveChecksum(1) && PathInfo(failedFile).isExist()) - { - DBG << "reusing blocks from file " << failedFile << endl; - bl.reuseBlocks(file, failedFile.asString()); - DBG << bl << endl; - filesystem::unlink(failedFile); - } - Pathname df = deltafile(); - if (!df.empty()) - { - DBG << "reusing blocks from file " << df << endl; - bl.reuseBlocks(file, df.asString()); - DBG << bl << endl; - } - try - { - multifetch(filename, file, &urls, &report, &bl); - } - catch (MediaCurlException &ex) - { - userabort = ex.errstr() == "User abort"; - ZYPP_RETHROW(ex); - } + ::unlink(failedFile.asString().c_str()); + filesystem::hardlinkCopy(destNew, failedFile); } - catch (Exception &ex) + if (userabort) { - // something went wrong. fall back to normal download - if (file) - fclose(file); - file = NULL; - if (PathInfo(destNew).size() >= 63336) - { - ::unlink(failedFile.asString().c_str()); - filesystem::hardlinkCopy(destNew, failedFile); - } - if (userabort) - { - filesystem::unlink(destNew); - ZYPP_RETHROW(ex); - } - file = fopen(destNew.c_str(), "w+"); - if (!file) - ZYPP_THROW(MediaWriteException(destNew)); - MediaCurl::doGetFileCopyFile(filename, dest, file, report, options | OPTION_NO_REPORT_START); + filesystem::unlink(destNew); + ZYPP_RETHROW(ex); } + file = fopen(destNew.c_str(), "w+"); + if (!file) + ZYPP_THROW(MediaWriteException(destNew)); + MediaCurl::doGetFileCopyFile(filename, dest, file, report, options | OPTION_NO_REPORT_START); } } + if (::fchmod( ::fileno(file), filesystem::applyUmaskTo( 0644 ))) { ERR << "Failed to chmod file " << destNew << endl; @@ -1390,6 +1435,11 @@ req._timeout = _settings.timeout(); req._connect_timeout = _settings.connectTimeout(); req._maxspeed = _settings.maxDownloadSpeed(); + req._maxworkers = _settings.maxConcurrentConnections(); + if (req._maxworkers > MAXURLS) + req._maxworkers = MAXURLS; + if (req._maxworkers <= 0) + req._maxworkers = 1; std::vector<Url> myurllist; for (std::vector<Url>::iterator urliter = urllist->begin(); urliter != urllist->end(); ++urliter) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/zypp/repo/PackageProvider.cc new/libzypp-8.12.5/zypp/repo/PackageProvider.cc --- old/libzypp-8.12.1/zypp/repo/PackageProvider.cc 2011-02-14 14:47:33.000000000 +0100 +++ new/libzypp-8.12.5/zypp/repo/PackageProvider.cc 2011-05-31 10:37:39.000000000 +0200 @@ -76,6 +76,7 @@ , _package( package ) , _deltas(deltas) , _access(access) + , _retry(false) {} PackageProvider::~PackageProvider() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/zypp/sat/AttrMatcher.cc new/libzypp-8.12.5/zypp/sat/AttrMatcher.cc --- old/libzypp-8.12.1/zypp/sat/AttrMatcher.cc 2011-02-14 14:47:33.000000000 +0100 +++ new/libzypp-8.12.5/zypp/sat/AttrMatcher.cc 2011-05-31 10:37:39.000000000 +0200 @@ -186,7 +186,7 @@ { if ( !_matcher ) { - if ( ! _flags.mode() == Match::OTHER ) + if ( _flags.mode() == Match::OTHER ) ZYPP_THROW( MatchUnknownModeException( _flags, _search ) ); _matcher.reset( new ::_Datamatcher ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-8.12.1/zypp.conf new/libzypp-8.12.5/zypp.conf --- old/libzypp-8.12.1/zypp.conf 2011-02-14 14:47:32.000000000 +0100 +++ new/libzypp-8.12.5/zypp.conf 2011-05-31 10:37:39.000000000 +0200 @@ -122,10 +122,14 @@ ## ## Maximum number of concurrent connections to use per transfer +## +## Valid values: Integer +## Default value: 5 +## ## This setting is only used if more than one is possible ## Setting it to a reasonable number avoids flooding servers ## -# download.max_concurrent_connections = 2 +# download.max_concurrent_connections = 5 ## ## Sets the minimum download speed (bytes per second) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
