Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2017-03-21 22:46:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp" Tue Mar 21 22:46:52 2017 rev:376 rq:481773 version:16.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2017-02-25 00:46:58.112845688 +0100 +++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2017-03-21 22:47:30.492094508 +0100 @@ -1,0 +2,16 @@ +Tue Mar 21 13:38:08 CET 2017 - [email protected] + +- MediaCurl: Treat http response 410(Gone) like 404(Not Found) + (bsc#1030136) +- version 16.5.1 (0) + +------------------------------------------------------------------- +Thu Mar 16 14:06:03 CET 2017 - [email protected] + +- Support multi-volume repomd repositories (FATE#320544) +- MediaCurl: ZYPP_MEDIA_CURL_IPRESOLVE=<4|6> to force name resolution + to IPv4/IPv6 only (fixes openSUSE/zypper#49) +- Add support for openssl >= 1.1 +- version 16.5.0 (0) + +------------------------------------------------------------------- Old: ---- libzypp-16.4.3.tar.bz2 New: ---- libzypp-16.5.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.QpO9Lf/_old 2017-03-21 22:47:31.991882477 +0100 +++ /var/tmp/diff_new_pack.QpO9Lf/_new 2017-03-21 22:47:31.995881911 +0100 @@ -19,7 +19,7 @@ %define force_gcc_46 0 Name: libzypp -Version: 16.4.3 +Version: 16.5.1 Release: 0 Url: git://gitorious.org/opensuse/libzypp.git Summary: Package, Patch, Pattern, and Product Management ++++++ libzypp-16.4.3.tar.bz2 -> libzypp-16.5.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/VERSION.cmake new/libzypp-16.5.1/VERSION.cmake --- old/libzypp-16.4.3/VERSION.cmake 2017-02-20 10:16:09.000000000 +0100 +++ new/libzypp-16.5.1/VERSION.cmake 2017-03-21 13:41:10.000000000 +0100 @@ -60,9 +60,9 @@ # SET(LIBZYPP_MAJOR "16") SET(LIBZYPP_COMPATMINOR "0") -SET(LIBZYPP_MINOR "4") -SET(LIBZYPP_PATCH "3") +SET(LIBZYPP_MINOR "5") +SET(LIBZYPP_PATCH "1") # -# LAST RELEASED: 16.4.3 (0) +# LAST RELEASED: 16.5.1 (0) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/doc/autoinclude/EnvironmentVariables.doc new/libzypp-16.5.1/doc/autoinclude/EnvironmentVariables.doc --- old/libzypp-16.4.3/doc/autoinclude/EnvironmentVariables.doc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.5.1/doc/autoinclude/EnvironmentVariables.doc 2017-03-08 12:51:07.000000000 +0100 @@ -30,6 +30,7 @@ \li \c LIBSOLV_DEBUGMASK=<INT> Pass value to libsolv::pool_setdebugmask \li \c ZYPP_MEDIA_CURL_DEBUG=<1|2> Log http headers, if \c 2 also log server responses. +\li \c ZYPP_MEDIA_CURL_IPRESOLVE=<4|6> Tell curl to resolve names to IPv4/IPv6 addresses only. \subsection zypp-envars-mediabackend Selecting the mediabackend to use. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/package/libzypp.changes new/libzypp-16.5.1/package/libzypp.changes --- old/libzypp-16.4.3/package/libzypp.changes 2017-02-20 10:16:09.000000000 +0100 +++ new/libzypp-16.5.1/package/libzypp.changes 2017-03-21 13:41:10.000000000 +0100 @@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Tue Mar 21 13:38:08 CET 2017 - [email protected] + +- MediaCurl: Treat http response 410(Gone) like 404(Not Found) + (bsc#1030136) +- version 16.5.1 (0) + +------------------------------------------------------------------- +Thu Mar 16 14:06:03 CET 2017 - [email protected] + +- Support multi-volume repomd repositories (FATE#320544) +- MediaCurl: ZYPP_MEDIA_CURL_IPRESOLVE=<4|6> to force name resolution + to IPv4/IPv6 only (fixes openSUSE/zypper#49) +- Add support for openssl >= 1.1 +- version 16.5.0 (0) + +------------------------------------------------------------------- Mon Feb 20 10:10:43 CET 2017 - [email protected] - PublicKey: Create tmpdirs inside ZYpp::tmpPath (bsc#926844) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/zypp/MediaSetAccess.cc new/libzypp-16.5.1/zypp/MediaSetAccess.cc --- old/libzypp-16.4.3/zypp/MediaSetAccess.cc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.5.1/zypp/MediaSetAccess.cc 2017-03-17 12:26:07.000000000 +0100 @@ -170,6 +170,20 @@ return op.result; } + Pathname MediaSetAccess::provideOptionalFile( const Pathname & file, unsigned media_nr ) + { + try + { + if ( doesFileExist( file, media_nr ) ) + return provideFile( file, media_nr, PROVIDE_NON_INTERACTIVE ); + } + catch ( const media::MediaFileNotFoundException & excpt_r ) + { ZYPP_CAUGHT( excpt_r ); } + catch ( const media::MediaNotAFileException & excpt_r ) + { ZYPP_CAUGHT( excpt_r ); } + return Pathname(); + } + bool MediaSetAccess::doesFileExist(const Pathname & file, unsigned media_nr ) { ProvideFileExistenceOperation op; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/zypp/MediaSetAccess.h new/libzypp-16.5.1/zypp/MediaSetAccess.h --- old/libzypp-16.4.3/zypp/MediaSetAccess.h 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.5.1/zypp/MediaSetAccess.h 2017-03-17 12:26:07.000000000 +0100 @@ -172,6 +172,15 @@ Pathname provideFile(const Pathname & file, unsigned media_nr = 1, ProvideFileOptions options = PROVIDE_DEFAULT ); /** + * Provides an optional \a file from media \a media_nr. + * + * Like \ref provideFile (NON_INTERACTIVE), but return an empty \ref Pathname + * rather than throwing a \ref MediaException if the file is not present on + * the media. + */ + Pathname provideOptionalFile( const Pathname & file, unsigned media_nr = 1 ); + + /** * Release file from media. * This signal that file is not needed anymore. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/zypp/RepoManager.cc new/libzypp-16.5.1/zypp/RepoManager.cc --- old/libzypp-16.4.3/zypp/RepoManager.cc 2016-12-19 11:46:09.000000000 +0100 +++ new/libzypp-16.5.1/zypp/RepoManager.cc 2017-03-17 12:26:07.000000000 +0100 @@ -891,7 +891,7 @@ switch ( repokind.toEnum() ) { case RepoType::RPMMD_e : - status = RepoStatus( productdatapath/"repodata/repomd.xml"); + status = RepoStatus( productdatapath/"repodata/repomd.xml") && RepoStatus( mediarootpath/"media.1/media" ); break; case RepoType::YAST2_e : @@ -960,27 +960,31 @@ Pathname mediarootpath = rawcache_path_for_repoinfo( _options, info ); filesystem::assert_dir( mediarootpath ); RepoStatus oldstatus = metadataStatus( info ); - if ( oldstatus.empty() ) { MIL << "No cached metadata, going to refresh" << endl; return REFRESH_NEEDED; } + if ( url.schemeIsVolatile() ) { - if ( url.schemeIsVolatile() ) - { - MIL << "never refresh CD/DVD" << endl; - return REPO_UP_TO_DATE; - } - if ( url.schemeIsLocal() ) - { - policy = RefreshIfNeededIgnoreDelay; - } + MIL << "Never refresh CD/DVD" << endl; + return REPO_UP_TO_DATE; + } + + if ( policy == RefreshForced ) + { + MIL << "Forced refresh!" << endl; + return REFRESH_NEEDED; + } + + if ( url.schemeIsLocal() ) + { + policy = RefreshIfNeededIgnoreDelay; } // now we've got the old (cached) status, we can decide repo.refresh.delay - if (policy != RefreshForced && policy != RefreshIfNeededIgnoreDelay) + if ( policy != RefreshIfNeededIgnoreDelay ) { // difference in seconds double diff = difftime( @@ -1042,27 +1046,17 @@ } // check status - bool refresh = false; if ( oldstatus == newstatus ) { MIL << "repo has not changed" << endl; - if ( policy == RefreshForced ) - { - MIL << "refresh set to forced" << endl; - refresh = true; - } + touchIndexFile( info ); + return REPO_UP_TO_DATE; } else { MIL << "repo has changed, going to refresh" << endl; - refresh = true; + return REFRESH_NEEDED; } - - if (!refresh) - touchIndexFile(info); - - return refresh ? REFRESH_NEEDED : REPO_UP_TO_DATE; - } catch ( const Exception &e ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/zypp/base/DtorReset.h new/libzypp-16.5.1/zypp/base/DtorReset.h --- old/libzypp-16.4.3/zypp/base/DtorReset.h 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.5.1/zypp/base/DtorReset.h 2017-03-10 11:11:10.000000000 +0100 @@ -49,6 +49,8 @@ class DtorReset { public: + DtorReset() {} + template<class TVar> DtorReset( TVar & var_r ) : _pimpl( new Impl<TVar,TVar>( var_r, var_r ) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/zypp/media/MediaCurl.cc new/libzypp-16.5.1/zypp/media/MediaCurl.cc --- old/libzypp-16.4.3/zypp/media/MediaCurl.cc 2017-02-03 13:41:11.000000000 +0100 +++ new/libzypp-16.5.1/zypp/media/MediaCurl.cc 2017-03-21 13:41:10.000000000 +0100 @@ -151,6 +151,33 @@ } namespace zypp { + + /////////////////////////////////////////////////////////////////// + namespace env + { + namespace + { + inline int getZYPP_MEDIA_CURL_IPRESOLVE() + { + int ret = 0; + if ( const char * envp = getenv( "ZYPP_MEDIA_CURL_IPRESOLVE" ) ) + { + WAR << "env set: $ZYPP_MEDIA_CURL_IPRESOLVE='" << envp << "'" << endl; + if ( strcmp( envp, "4" ) == 0 ) ret = 4; + else if ( strcmp( envp, "6" ) == 0 ) ret = 6; + } + return ret; + } + } + + inline int ZYPP_MEDIA_CURL_IPRESOLVE() + { + static int _v = getZYPP_MEDIA_CURL_IPRESOLVE(); + return _v; + } + } // namespace env + /////////////////////////////////////////////////////////////////// + namespace media { namespace { @@ -672,6 +699,16 @@ fillSettingsSystemProxy(_url, _settings); } + /** Force IPv4/v6 */ + if ( env::ZYPP_MEDIA_CURL_IPRESOLVE() ) + { + switch ( env::ZYPP_MEDIA_CURL_IPRESOLVE() ) + { + case 4: SET_OPTION(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); break; + case 6: SET_OPTION(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); break; + } + } + /** * Connect timeout */ @@ -1021,7 +1058,6 @@ else url = getFileUrl(filename); std::string err; - try { switch ( code ) { @@ -1069,6 +1105,7 @@ ZYPP_THROW(MediaForbiddenException(url, msg403)); } case 404: + case 410: ZYPP_THROW(MediaFileNotFoundException(_url, filename)); } @@ -1129,10 +1166,6 @@ // uhm, no 0 code but unknown curl exception ZYPP_THROW(MediaCurlException(url, err, _curlError)); } - catch (const MediaException & excpt_r) - { - ZYPP_RETHROW(excpt_r); - } } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/zypp/repo/MediaInfoDownloader.cc new/libzypp-16.5.1/zypp/repo/MediaInfoDownloader.cc --- old/libzypp-16.4.3/zypp/repo/MediaInfoDownloader.cc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.5.1/zypp/repo/MediaInfoDownloader.cc 2017-03-17 12:26:07.000000000 +0100 @@ -27,7 +27,7 @@ const ProgressData::ReceiverFnc & progressrcv ) { Fetcher fetcher; - fetcher.enqueue( OnMediaLocation("/media.1/media") ); + fetcher.enqueue( OnMediaLocation("/media.1/media").setOptional(true) ); fetcher.start( dest_dir, media, progressrcv ); // ready, go! fetcher.reset(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-16.4.3/zypp/repo/yum/Downloader.cc new/libzypp-16.5.1/zypp/repo/yum/Downloader.cc --- old/libzypp-16.4.3/zypp/repo/yum/Downloader.cc 2016-11-29 11:31:52.000000000 +0100 +++ new/libzypp-16.5.1/zypp/repo/yum/Downloader.cc 2017-03-17 12:26:07.000000000 +0100 @@ -37,8 +37,8 @@ RepoStatus Downloader::status( MediaSetAccess &media ) { - Pathname repomd = media.provideFile( repoInfo().path() + "/repodata/repomd.xml"); - return RepoStatus(repomd); + return RepoStatus( media.provideFile( repoInfo().path() / "/repodata/repomd.xml" ) ) + && RepoStatus( media.provideOptionalFile( "/media.1/media" ) ); } static OnMediaLocation loc_with_path_prefix( const OnMediaLocation & loc, const Pathname & prefix ) @@ -173,6 +173,8 @@ void Downloader::download( MediaSetAccess & media, const Pathname & dest_dir, const ProgressData::ReceiverFnc & progressrcv ) { + downloadMediaInfo( dest_dir, media ); + Pathname masterIndex( repoInfo().path() / "/repodata/repomd.xml" ); defaultDownloadMasterIndex( media, dest_dir, masterIndex );
