Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2022-09-04 22:11:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp" Sun Sep 4 22:11:31 2022 rev:462 rq:1000940 version:17.31.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2022-07-26 19:42:44.851352328 +0200 +++ /work/SRC/openSUSE:Factory/.libzypp.new.2083/libzypp.changes 2022-09-04 22:11:34.508250739 +0200 @@ -1,0 +2,15 @@ +Fri Sep 2 16:38:42 CEST 2022 - m...@suse.de + +- UsrEtc: Store logrotate files in %{_distconfdir} if defined + (fixes #402) +- Log backtrace on SIGABRT too. +- Need to explicitly enable building experimental code. Otherwise + an old Notcurses++ package which happens to be present in the + buildenv breaks the build (fixes #412). +- Work around libyui/libyui#78 on code 15.4 and older. +- Stop using std::*ary_function; deprecated and removed in c++17. +- Don't expose header files which use types not available in + c++11. In 15.3 and older, YAST and PK compile with -std=c++11. +- version 17.31.1 (22) + +------------------------------------------------------------------- Old: ---- libzypp-17.31.0.tar.bz2 New: ---- libzypp-17.31.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.fMWU6G/_old 2022-09-04 22:11:35.168252595 +0200 +++ /var/tmp/diff_new_pack.fMWU6G/_new 2022-09-04 22:11:35.176252619 +0200 @@ -43,7 +43,7 @@ %bcond_with enable_preview_single_rpmtrans_as_default_for_zypper Name: libzypp -Version: 17.31.0 +Version: 17.31.1 Release: 0 License: GPL-2.0-or-later URL: https://github.com/openSUSE/libzypp @@ -314,74 +314,34 @@ # Create filelist with translations %{find_lang} zypp +%if %{defined _distconfdir} +# Move logratate files form /etc/logrotate.d to /usr/etc/logrotate.d +mkdir -p %{buildroot}/%{_distconfdir}/logrotate.d +mv %{buildroot}/%{_sysconfdir}/logrotate.d/zypp-history.lr %{buildroot}%{_distconfdir}/logrotate.d +%endif + %check pushd build/tests LD_LIBRARY_PATH="$(pwd)/../zypp:$LD_LIBRARY_PATH" ctest --output-on-failure . popd -%post -/sbin/ldconfig -if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi - -# convert old lock file to new -# TODO make this a separate file? -# TODO run the sript only when updating form pre-11.0 libzypp versions -LOCKSFILE=%{_sysconfdir}/zypp/locks -OLDLOCKSFILE=%{_sysconfdir}/zypp/locks.old - -is_old(){ - # if no such file, exit with false (1 in bash) - test -f ${LOCKSFILE} || return 1 - TEMP_FILE=`mktemp` - cat ${LOCKSFILE} | sed '/^\#.*/ d;/.*:.*/d;/^[^[a-zA-Z\*?.0-9]*$/d' > ${TEMP_FILE} - if [ -s ${TEMP_FILE} ] - then - RES=0 - else - RES=1 - fi - rm -f ${TEMP_FILE} - return ${RES} -} - -append_new_lock(){ - case "$#" in - 1 ) - echo " -solvable_name: $1 -match_type: glob -" >> ${LOCKSFILE} -;; - 2 ) #TODO version - echo " -solvable_name: $1 -match_type: glob -Version: $2 -" >> ${LOCKSFILE} -;; - 3 ) #TODO version - echo " -solvable_name: $1 -match_type: glob -Version: $2 $3 -" >> ${LOCKSFILE} - ;; -esac -} - -die() { - echo $1 - exit 1 -} - -if is_old ${LOCKSFILE} - then - mv -f ${LOCKSFILE} ${OLDLOCKSFILE} || die "cannot backup old locks" - cat ${OLDLOCKSFILE}| sed "/^\#.*/d"| while read line - do - append_new_lock $line - done -fi +%if %{defined _distconfdir} +%pre +# Prepare for migration to /usr/etc; save any old .rpmsave +for i in logrotate.d/zypp-history.lr; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||: +done +%endif + +%if %{defined _distconfdir} +%posttrans +# Migration to /usr/etc, restore just created .rpmsave +for i in logrotate.d/zypp-history.lr; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||: +done +%endif + +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -406,7 +366,11 @@ %dir %{_sysconfdir}/zypp/credentials.d %config(noreplace) %{_sysconfdir}/zypp/zypp.conf %config(noreplace) %{_sysconfdir}/zypp/systemCheck +%if %{defined _distconfdir} +%{_distconfdir}/logrotate.d/zypp-history.lr +%else %config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr +%endif %dir %{_var}/lib/zypp %if "%{_libexecdir}" != "%{_prefix}/lib" %dir %{_libexecdir}/zypp ++++++ libzypp-17.31.0.tar.bz2 -> libzypp-17.31.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/CMakeLists.txt new/libzypp-17.31.1/CMakeLists.txt --- old/libzypp-17.31.0/CMakeLists.txt 2022-07-07 14:19:44.000000000 +0200 +++ new/libzypp-17.31.1/CMakeLists.txt 2022-08-24 15:08:49.000000000 +0200 @@ -61,7 +61,7 @@ cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) -find_package(FindPkgConfig) +find_package(FindPkgConfig, QUIET) INCLUDE( ${LIBZYPP_SOURCE_DIR}/VERSION.cmake ) MATH( EXPR LIBZYPP_NUMVERSION "${LIBZYPP_MAJOR} * 10000 + ${LIBZYPP_MINOR} * 100 + ${LIBZYPP_PATCH}" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/VERSION.cmake new/libzypp-17.31.1/VERSION.cmake --- old/libzypp-17.31.0/VERSION.cmake 2022-07-19 16:05:50.000000000 +0200 +++ new/libzypp-17.31.1/VERSION.cmake 2022-09-02 16:44:58.000000000 +0200 @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "17") SET(LIBZYPP_COMPATMINOR "22") SET(LIBZYPP_MINOR "31") -SET(LIBZYPP_PATCH "0") +SET(LIBZYPP_PATCH "1") # -# LAST RELEASED: 17.31.0 (22) +# LAST RELEASED: 17.31.1 (22) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/libzypp.spec.cmake new/libzypp-17.31.1/libzypp.spec.cmake --- old/libzypp-17.31.0/libzypp.spec.cmake 2022-07-07 14:19:44.000000000 +0200 +++ new/libzypp-17.31.1/libzypp.spec.cmake 2022-08-31 11:46:35.000000000 +0200 @@ -313,74 +313,34 @@ # Create filelist with translations %{find_lang} zypp +%if %{defined _distconfdir} +# Move logratate files form /etc/logrotate.d to /usr/etc/logrotate.d +mkdir -p %{buildroot}/%{_distconfdir}/logrotate.d +mv %{buildroot}/%{_sysconfdir}/logrotate.d/zypp-history.lr %{buildroot}%{_distconfdir}/logrotate.d +%endif + %check pushd build/tests LD_LIBRARY_PATH="$(pwd)/../zypp:$LD_LIBRARY_PATH" ctest --output-on-failure . popd -%post -/sbin/ldconfig -if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi - -# convert old lock file to new -# TODO make this a separate file? -# TODO run the sript only when updating form pre-11.0 libzypp versions -LOCKSFILE=%{_sysconfdir}/zypp/locks -OLDLOCKSFILE=%{_sysconfdir}/zypp/locks.old - -is_old(){ - # if no such file, exit with false (1 in bash) - test -f ${LOCKSFILE} || return 1 - TEMP_FILE=`mktemp` - cat ${LOCKSFILE} | sed '/^\#.*/ d;/.*:.*/d;/^[^[a-zA-Z\*?.0-9]*$/d' > ${TEMP_FILE} - if [ -s ${TEMP_FILE} ] - then - RES=0 - else - RES=1 - fi - rm -f ${TEMP_FILE} - return ${RES} -} - -append_new_lock(){ - case "$#" in - 1 ) - echo " -solvable_name: $1 -match_type: glob -" >> ${LOCKSFILE} -;; - 2 ) #TODO version - echo " -solvable_name: $1 -match_type: glob -version: $2 -" >> ${LOCKSFILE} -;; - 3 ) #TODO version - echo " -solvable_name: $1 -match_type: glob -version: $2 $3 -" >> ${LOCKSFILE} - ;; -esac -} - -die() { - echo $1 - exit 1 -} - -if is_old ${LOCKSFILE} - then - mv -f ${LOCKSFILE} ${OLDLOCKSFILE} || die "cannot backup old locks" - cat ${OLDLOCKSFILE}| sed "/^\#.*/d"| while read line - do - append_new_lock $line - done -fi +%if %{defined _distconfdir} +%pre +# Prepare for migration to /usr/etc; save any old .rpmsave +for i in logrotate.d/zypp-history.lr; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||: +done +%endif + +%if %{defined _distconfdir} +%posttrans +# Migration to /usr/etc, restore just created .rpmsave +for i in logrotate.d/zypp-history.lr; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||: +done +%endif + +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -405,7 +365,11 @@ %dir %{_sysconfdir}/zypp/credentials.d %config(noreplace) %{_sysconfdir}/zypp/zypp.conf %config(noreplace) %{_sysconfdir}/zypp/systemCheck +%if %{defined _distconfdir} +%{_distconfdir}/logrotate.d/zypp-history.lr +%else %config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr +%endif %dir %{_var}/lib/zypp %if "%{_libexecdir}" != "%{_prefix}/lib" %dir %{_libexecdir}/zypp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/package/libzypp.changes new/libzypp-17.31.1/package/libzypp.changes --- old/libzypp-17.31.0/package/libzypp.changes 2022-07-19 16:05:50.000000000 +0200 +++ new/libzypp-17.31.1/package/libzypp.changes 2022-09-02 16:44:58.000000000 +0200 @@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Fri Sep 2 16:38:42 CEST 2022 - m...@suse.de + +- UsrEtc: Store logrotate files in %{_distconfdir} if defined + (fixes #402) +- Log backtrace on SIGABRT too. +- Need to explicitly enable building experimental code. Otherwise + an old Notcurses++ package which happens to be present in the + buildenv breaks the build (fixes #412). +- Work around libyui/libyui#78 on code 15.4 and older. +- Stop using std::*ary_function; deprecated and removed in c++17. +- Don't expose header files which use types not available in + c++11. In 15.3 and older, YAST and PK compile with -std=c++11. +- version 17.31.1 (22) + +------------------------------------------------------------------- Tue Jul 19 16:03:01 CEST 2022 - m...@suse.de - Add PoolItem::statusReinit to reset the status it's initial diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/po/mk.po new/libzypp-17.31.1/po/mk.po --- old/libzypp-17.31.0/po/mk.po 2022-07-12 09:17:01.000000000 +0200 +++ new/libzypp-17.31.1/po/mk.po 2022-08-30 09:14:15.000000000 +0200 @@ -7,7 +7,7 @@ "Project-Id-Version: YaST (@memory@)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-03-14 15:21+0100\n" -"PO-Revision-Date: 2022-07-12 07:12+0000\n" +"PO-Revision-Date: 2022-08-30 07:13+0000\n" "Last-Translator: Kristijan Fremen Velkovski <m...@krisfremen.com>\n" "Language-Team: Macedonian <https://l10n.opensuse.org/projects/libzypp/master/" "mk/>\n" @@ -782,7 +782,7 @@ #. :LBR:430: #: zypp/CountryCode.cc:288 msgid "Lesotho" -msgstr "" +msgstr "????????????" # LT # fuzzy @@ -823,34 +823,32 @@ #. :MCO:492: #: zypp/CountryCode.cc:295 msgid "Moldova" -msgstr "" +msgstr "??????????????????" #. :MDA:498: #: zypp/CountryCode.cc:296 msgid "Montenegro" -msgstr "" +msgstr "???????? ????????" #: zypp/CountryCode.cc:297 msgid "Saint Martin" -msgstr "" +msgstr "?????????? ????????????" #: zypp/CountryCode.cc:298 msgid "Madagascar" -msgstr "" +msgstr "????????????????????" # FO # fuzzy #. :MDG:450: #: zypp/CountryCode.cc:299 -#, fuzzy msgid "Marshall Islands" -msgstr "??????????" +msgstr "?????????????????? ??????????????" #. :MHL:584: #: zypp/CountryCode.cc:300 -#, fuzzy msgid "Macedonia" -msgstr "????????????????????" +msgstr "????????????????????" # ML # fuzzy @@ -869,7 +867,7 @@ #. :MMR:104: #: zypp/CountryCode.cc:303 msgid "Mongolia" -msgstr "" +msgstr "??????????????????" # MO # fuzzy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/tests/lib/WebServer.cc new/libzypp-17.31.1/tests/lib/WebServer.cc --- old/libzypp-17.31.0/tests/lib/WebServer.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/tests/lib/WebServer.cc 2022-07-29 11:57:20.000000000 +0200 @@ -281,7 +281,7 @@ FCGX_Request request; FCGX_InitRequest(&request, sockFD,0); - AutoDispose<FCGX_Request*> guard( &request, boost::bind( &FCGX_Free, _1, 0 ) ); + AutoDispose<FCGX_Request*> guard( &request, std::bind( &FCGX_Free, _1, 0 ) ); struct pollfd fds[] { { _wakeupPipe[0], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/tests/repo/RepoVariables_test.cc new/libzypp-17.31.1/tests/repo/RepoVariables_test.cc --- old/libzypp-17.31.0/tests/repo/RepoVariables_test.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/tests/repo/RepoVariables_test.cc 2022-07-29 11:57:20.000000000 +0200 @@ -29,17 +29,12 @@ } // A plain functor -struct PlainTransformator +struct FncTransformator { std::string operator()( const std::string & value_r ) const { return "{"+value_r+"}"; } }; -// plain functor + required std::unary_function typedefs -struct FncTransformator : public PlainTransformator, public std::unary_function<const std::string &, std::string> -{}; - - BOOST_AUTO_TEST_CASE(value_transform) { using zypp::base::ValueTransform; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/tools/CMakeLists.txt new/libzypp-17.31.1/tools/CMakeLists.txt --- old/libzypp-17.31.0/tools/CMakeLists.txt 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/tools/CMakeLists.txt 2022-08-24 15:08:49.000000000 +0200 @@ -32,8 +32,14 @@ ADD_SUBDIRECTORY( zypp-media-tvm ) ADD_SUBDIRECTORY( zypp-media-chksum ) -FIND_PACKAGE( Notcurses++ ) -if ( Notcurses++_FOUND) - message("Found Notcurses++, enabling repomirror build") - ADD_SUBDIRECTORY( repomirror ) -endif() +## ############################################################ +OPTION( ENABLE_DEVTOOL_REPOMIRROR "Devtool: build repomirror?" OFF ) +IF ( ENABLE_DEVTOOL_REPOMIRROR ) + MESSAGE( STATUS "DEVTOOL_REPOMIRROR enabled" ) + FIND_PACKAGE( Notcurses++, QUIET ) + if ( NOT Notcurses++_FOUND ) + MESSAGE( FATAL_ERROR " DEVTOOL_REPOMIRROR: Notcurses++ not found" ) + ENDIF() + ADD_SUBDIRECTORY( repomirror ) +ENDIF ( ENABLE_DEVTOOL_REPOMIRROR ) +## ############################################################ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/Arch.h new/libzypp-17.31.1/zypp/Arch.h --- old/libzypp-17.31.0/zypp/Arch.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/Arch.h 2022-07-29 11:57:20.000000000 +0200 @@ -122,8 +122,8 @@ * \code * Arch::CompatSet cset( Arch::compatSet( Arch_x86_64 ) ); * - * cout << str::join( make_transform_iterator( cset.begin(), std::mem_fun_ref(&Arch::asString) ), - * make_transform_iterator( cset.end(), std::mem_fun_ref(&Arch::asString) ) ) + * cout << str::join( make_transform_iterator( cset.begin(), std::mem_fn(&Arch::asString) ), + * make_transform_iterator( cset.end(), std::mem_fn(&Arch::asString) ) ) * << endl; * * // Prints: x86_64 athlon i686 i586 i486 i386 noarch @@ -134,8 +134,8 @@ /** */ static std::string asString( const CompatSet & cset ) { - return str::join( make_transform_iterator( cset.begin(), std::mem_fun_ref(&Arch::asString) ), - make_transform_iterator( cset.end(), std::mem_fun_ref(&Arch::asString) ) ); + return str::join( make_transform_iterator( cset.begin(), std::mem_fn(&Arch::asString) ), + make_transform_iterator( cset.end(), std::mem_fn(&Arch::asString) ) ); } public: @@ -330,7 +330,7 @@ /** Functor finding compatible architectures. * \see Arch::compatibleWith */ - struct ArchCompatibleWith : public std::unary_function<Arch,bool> + struct ArchCompatibleWith { /** The target architecture */ Arch _targetArch; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/Capability.h new/libzypp-17.31.1/zypp/Capability.h --- old/libzypp-17.31.0/zypp/Capability.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/Capability.h 2022-07-29 11:57:20.000000000 +0200 @@ -201,7 +201,7 @@ /** \ref matches functor. */ - struct Matches: public std::binary_function<Capability,Capability,CapMatch> + struct Matches { CapMatch operator()( const Capability & lhs, const Capability & rhs ) const { return Capability::matches( lhs, rhs ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/Edition.h new/libzypp-17.31.1/zypp/Edition.h --- old/libzypp-17.31.0/zypp/Edition.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/Edition.h 2022-07-29 11:57:20.000000000 +0200 @@ -157,7 +157,7 @@ /** \ref match functor. * \see \ref RelCompare. */ - struct Match: public std::binary_function<Edition,Edition,int> + struct Match { int operator()( const Edition & lhs, const Edition & rhs ) const { return Edition::match( lhs, rhs ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/Filter.h new/libzypp-17.31.1/zypp/Filter.h --- old/libzypp-17.31.0/zypp/Filter.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/Filter.h 2022-07-29 11:57:20.000000000 +0200 @@ -68,17 +68,17 @@ public: /** Solvables with locale support. */ ByLocaleSupport() - : _sel( boost::mem_fun_ref( &sat::Solvable::supportsLocales ) ) + : _sel( std::mem_fn(&sat::Solvable::supportsLocales) ) {} /** Solvables supporting \c locale_r. */ explicit ByLocaleSupport( const Locale & locale_r ) - : _sel( boost::bind( boost::mem_fun_ref( (LS1)&sat::Solvable::supportsLocale ), _1, locale_r ) ) + : _sel( std::bind( std::mem_fn((LS1)&sat::Solvable::supportsLocale), _1, locale_r ) ) {} /** Solvables supporting at least one locale in \c locales_r. */ explicit ByLocaleSupport( const LocaleSet & locales_r ) - : _sel( boost::bind( boost::mem_fun_ref( (LS2)&sat::Solvable::supportsLocale ), _1, locales_r ) ) + : _sel( std::bind( std::mem_fn((LS2)&sat::Solvable::supportsLocale), _1, locales_r ) ) {} public: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/KeyManager.cc new/libzypp-17.31.1/zypp/KeyManager.cc --- old/libzypp-17.31.0/zypp/KeyManager.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/KeyManager.cc 2022-07-29 11:57:20.000000000 +0200 @@ -346,7 +346,6 @@ return ret; } -#if 1 std::list<PublicKeyData> KeyManagerCtx::readKeyFromFile( const Pathname & keyfile_r ) { // bsc#1140670: GPGME does not support reading keys from a keyfile using @@ -369,43 +368,6 @@ return ret; } -#else -std::list<PublicKeyData> KeyManagerCtx::readKeyFromFile( const Pathname & file_r ) -{ - std::list<PublicKeyData> ret; - GpgmeErr err = GPG_ERR_NO_ERROR; - - AutoDispose<gpgme_data_t> data { nullptr, &gpgme_data_release }; - if ( (err = gpgme_data_new_from_file( &(*data), file_r.c_str(), 1 )) != GPG_ERR_NO_ERROR ) { - ERR << "gpgme_data_new_from_file " << file_r << ": " << err << endl; - return ret; - } - - // Reset gpgme_keylist_mode on return! - AutoDispose<gpgme_keylist_mode_t> guard { gpgme_get_keylist_mode( _pimpl->_ctx ), bind( &gpgme_set_keylist_mode, _pimpl->_ctx, _1 ) }; - // Let listed keys include signatures (required if PublicKeyData are created from the key) - if ( (err = gpgme_set_keylist_mode( _pimpl->_ctx, GPGME_KEYLIST_MODE_LOCAL | GPGME_KEYLIST_MODE_SIGS )) != GPG_ERR_NO_ERROR ) { - ERR << "gpgme_set_keylist_mode: " << err << endl; - return ret; - } - - if ( (err = gpgme_op_keylist_from_data_start( _pimpl->_ctx, data, 0 )) != GPG_ERR_NO_ERROR ) { - ERR << "gpgme_op_keylist_from_data_start " << file_r << ": " << err << endl; - return ret; - } - // Close list operation on return! - AutoDispose<gpgme_ctx_t> guard2 { _pimpl->_ctx, &gpgme_op_keylist_end }; - - AutoDispose<gpgme_key_t> key { nullptr, &gpgme_key_release }; - for ( ; gpgme_op_keylist_next( _pimpl->_ctx, &(*key) ) == GPG_ERR_NO_ERROR; key.getDispose()( key ) ) { - PublicKeyData data { PublicKeyData::fromGpgmeKey( key ) }; - if ( data ) - ret.push_back( data ); - } - - return ret; -} -#endif bool KeyManagerCtx::verify(const Pathname &file, const Pathname &signature) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/Locks.cc new/libzypp-17.31.1/zypp/Locks.cc --- old/libzypp-17.31.0/zypp/Locks.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/Locks.cc 2022-08-24 15:08:49.000000000 +0200 @@ -9,14 +9,13 @@ #include <set> #include <fstream> -#include <boost/function.hpp> -#include <boost/iterator/function_output_iterator.hpp> #include <algorithm> #include <zypp/base/Regex.h> #include <zypp/base/String.h> #include <zypp/base/LogTools.h> #include <zypp/base/IOStream.h> +#include <zypp/base/Iterator.h> #include <zypp/PoolItem.h> #include <zypp/PoolQueryUtil.tcc> #include <zypp/ZYppCallbacks.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/MediaSetAccess.cc new/libzypp-17.31.1/zypp/MediaSetAccess.cc --- old/libzypp-17.31.0/zypp/MediaSetAccess.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/MediaSetAccess.cc 2022-07-29 11:57:20.000000000 +0200 @@ -165,7 +165,7 @@ Pathname MediaSetAccess::provideFile( const OnMediaLocation &resource, ProvideFileOptions options ) { ProvideFileOperation op; - provide( boost::ref(op), resource, options ); + provide( std::ref(op), resource, options ); return op.result; } @@ -231,7 +231,7 @@ { ProvideFileExistenceOperation op; OnMediaLocation resource(file, media_nr); - provide( boost::ref(op), resource, PROVIDE_DEFAULT ); + provide( std::ref(op), resource, PROVIDE_DEFAULT ); return op.result; } @@ -413,11 +413,11 @@ if ( recursive ) { ProvideDirTreeOperation op; - provide( boost::ref(op), resource, options ); + provide( std::ref(op), resource, options ); return op.result; } ProvideDirOperation op; - provide( boost::ref(op), resource, options ); + provide( std::ref(op), resource, options ); return op.result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/PurgeKernels.cc new/libzypp-17.31.1/zypp/PurgeKernels.cc --- old/libzypp-17.31.0/zypp/PurgeKernels.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/PurgeKernels.cc 2022-07-29 11:57:20.000000000 +0200 @@ -387,7 +387,7 @@ const auto versionPredicate = []( const auto &editionVariants ){ return [ &editionVariants ]( const auto &elem ) { - const auto &f = std::bind( versionMatch, std::placeholders::_1, elem.first ); + const auto &f = std::bind( versionMatch, _1, elem.first ); return std::any_of( editionVariants.begin(), editionVariants.end(), f ); }; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/RelCompare.h new/libzypp-17.31.1/zypp/RelCompare.h --- old/libzypp-17.31.0/zypp/RelCompare.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/RelCompare.h 2022-07-29 11:57:20.000000000 +0200 @@ -52,7 +52,7 @@ * // thus Edition::compare * \endcode * - * Furthermore a bunch of functors using a certain opertator is + * Furthermore a bunch of functors using a certain operator is * defined. All templated by type and general comparison * method (defaults to Compare\<Tp\>). * \code @@ -78,12 +78,12 @@ //@{ /** General compare functor returning <tt>-1, 0, 1</tt>. - * Expects Tp::compare to be a static comaprison method + * Expects Tp::compare to be a static comparison method * returning <tt>-1, 0, 1</tt> if the elements compare * <tt>\<,==,\></tt>. */ template<class Tp> - struct Compare : public std::binary_function<Tp,Tp,int> + struct Compare { int operator()( const Tp & lhs, const Tp & rhs ) const { return Tp::compare( lhs, rhs ); } @@ -93,7 +93,7 @@ /** Comparison of two elements using relational operator \a op. * Expects \a TCompare to be a binary operator returning - * <tt>-1, 0, 1</tt> if the elemants compare <tt>\<,==,\></tt>. + * <tt>-1, 0, 1</tt> if the elements compare <tt>\<,==,\></tt>. * \code * // Signature of compare function or functor: * int compare( const Tp & lhs, const Tp & rhs ); @@ -155,7 +155,7 @@ * Defaults to Compare\<Tp\>. */ template<class Tp, class TCompare = Compare<Tp> > - struct CompareBy : public std::binary_function<Tp,Tp,bool> + struct CompareBy { CompareBy( Rel op_r ) : _op( op_r ) @@ -168,56 +168,56 @@ }; template<class Tp, class TCompare = Compare<Tp> > - struct CompareByEQ : public std::binary_function<Tp,Tp,bool> + struct CompareByEQ { bool operator()( const Tp & lhs, const Tp & rhs ) const { return compareByRel( Rel::EQ, lhs, rhs, TCompare() ); } }; template<class Tp, class TCompare = Compare<Tp> > - struct CompareByNE : public std::binary_function<Tp,Tp,bool> + struct CompareByNE { bool operator()( const Tp & lhs, const Tp & rhs ) const { return compareByRel( Rel::NE, lhs, rhs, TCompare() ); } }; template<class Tp, class TCompare = Compare<Tp> > - struct CompareByLT : public std::binary_function<Tp,Tp,bool> + struct CompareByLT { bool operator()( const Tp & lhs, const Tp & rhs ) const { return compareByRel( Rel::LT, lhs, rhs, TCompare() ); } }; template<class Tp, class TCompare = Compare<Tp> > - struct CompareByLE : public std::binary_function<Tp,Tp,bool> + struct CompareByLE { bool operator()( const Tp & lhs, const Tp & rhs ) const { return compareByRel( Rel::LE, lhs, rhs, TCompare() ); } }; template<class Tp, class TCompare = Compare<Tp> > - struct CompareByGT : public std::binary_function<Tp,Tp,bool> + struct CompareByGT { bool operator()( const Tp & lhs, const Tp & rhs ) const { return compareByRel( Rel::GT, lhs, rhs, TCompare() ); } }; template<class Tp, class TCompare = Compare<Tp> > - struct CompareByGE : public std::binary_function<Tp,Tp,bool> + struct CompareByGE { bool operator()( const Tp & lhs, const Tp & rhs ) const { return compareByRel( Rel::GE, lhs, rhs, TCompare() ); } }; template<class Tp, class TCompare = Compare<Tp> > - struct CompareByANY : public std::binary_function<Tp,Tp,bool> + struct CompareByANY { bool operator()( const Tp & lhs, const Tp & rhs ) const { return compareByRel( Rel::ANY, lhs, rhs, TCompare() ); } }; template<class Tp, class TCompare = Compare<Tp> > - struct CompareByNONE : public std::binary_function<Tp,Tp,bool> + struct CompareByNONE { bool operator()( const Tp & lhs, const Tp & rhs ) const { return compareByRel( Rel::NONE, lhs, rhs, TCompare() ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/ResFilters.h new/libzypp-17.31.1/zypp/ResFilters.h --- old/libzypp-17.31.0/zypp/ResFilters.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/ResFilters.h 2022-08-24 15:08:49.000000000 +0200 @@ -12,8 +12,6 @@ #ifndef ZYPP_RESFILTERS_H #define ZYPP_RESFILTERS_H -#include <boost/function.hpp> - #include <zypp/base/Functional.h> #include <zypp/Filter.h> #include <zypp/Resolvable.h> @@ -60,7 +58,7 @@ * return true; * } * - * unsigned _counter; + * unsigned & _counter; * }; * * ResStore store; @@ -106,11 +104,6 @@ * \note These functors are not limited to be used with ResStore::forEach. * You can use them with std::algorithms as well. * - * \note In case you already have functions or methods which do what you - * want, but thet don't perfectly match the required signature: Make yourself - * familiar with <tt>std::ptr_fun, mem_fun, bind1st, bind2nd and compose</tt>. - * They are sometimes quite helpfull. - * * \c PrintAndCount is an example how a functor can return data collected * during the query. You ca easily write a collector, that takes a * <tt>std:list\<ResObject::Ptr\>\&</tt> and fills it with the matches @@ -118,7 +111,7 @@ * * But as a rule of thumb, a functor should be lightweight. If you * want to get data out, pass references to variables in (and assert - * these variables live as long as the query lasts). Or use \ref FunctorRef. + * these variables live as long as the query lasts). Or use std::ref. * * Internally all functors are passed by value. Thus it would not help * you to create an instance of some collecting functor, and pass it @@ -148,16 +141,12 @@ /////////////////////////////////////////////////////////////////// /** */ - typedef std::unary_function<ResObject::constPtr, bool> ResObjectFilterFunctor; - typedef boost::function<bool ( ResObject::constPtr )> ResFilter; - - /** */ template<class TRes> inline filter::ByKind byKind() { return filter::ByKind( ResTraits<TRes>::kind ); } /** Select ResObject by name. */ - struct ByName : public ResObjectFilterFunctor + struct ByName { ByName() {} @@ -175,7 +164,7 @@ }; /** Select ResObject by repository or repository alias. */ - struct ByRepository : public ResObjectFilterFunctor + struct ByRepository { ByRepository( Repository repository_r ) : _alias( repository_r.info().alias() ) @@ -206,7 +195,7 @@ * \endcode */ template<class TCompare = CompareByEQ<Edition> > - struct ByEdition : public ResObjectFilterFunctor + struct ByEdition { ByEdition( const Edition & edition_r, TCompare cmp_r ) : _edition( edition_r ) @@ -246,7 +235,7 @@ * \endcode */ template<class TCompare = CompareByEQ<Arch> > - struct ByArch : public ResObjectFilterFunctor + struct ByArch { ByArch( const Arch & arch_r, TCompare cmp_r ) : _arch( arch_r ) @@ -281,11 +270,8 @@ // /////////////////////////////////////////////////////////////////// - /** */ - typedef std::unary_function<PoolItem, bool> PoolItemFilterFunctor; - /** Select PoolItem by installed. */ - struct ByInstalled : public PoolItemFilterFunctor + struct ByInstalled { bool operator()( const PoolItem & p ) const { @@ -294,7 +280,7 @@ }; /** Select PoolItem by uninstalled. */ - struct ByUninstalled : public PoolItemFilterFunctor + struct ByUninstalled { bool operator()( const PoolItem & p ) const { @@ -303,7 +289,7 @@ }; /** Select PoolItem by transact. */ - struct ByTransact : public PoolItemFilterFunctor + struct ByTransact { bool operator()( const PoolItem & p ) const { @@ -312,7 +298,7 @@ }; /** Select PoolItem by lock. */ - struct ByLock : public PoolItemFilterFunctor + struct ByLock { bool operator()( const PoolItem & p ) const { @@ -321,7 +307,7 @@ }; /** Select PoolItem by keep. */ - struct ByKeep : public PoolItemFilterFunctor + struct ByKeep { bool operator()( const PoolItem & p ) const { @@ -330,7 +316,7 @@ }; /** PoolItem which is recommended. */ - struct ByRecommended : public PoolItemFilterFunctor + struct ByRecommended { bool operator()( const PoolItem & p ) const { @@ -339,7 +325,7 @@ }; /** PoolItem which is suggested. */ - struct BySuggested : public PoolItemFilterFunctor + struct BySuggested { bool operator()( const PoolItem & p ) const { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/ResPoolProxy.cc new/libzypp-17.31.1/zypp/ResPoolProxy.cc --- old/libzypp-17.31.0/zypp/ResPoolProxy.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/ResPoolProxy.cc 2022-07-29 11:57:20.000000000 +0200 @@ -32,39 +32,39 @@ void saveState( ResPool pool_r ) { std::for_each( pool_r.begin(), pool_r.end(), - std::mem_fun_ref(&PoolItem::saveState) ); + std::mem_fn(&PoolItem::saveState) ); } void saveState( ResPool pool_r, const ResKind & kind_r ) { std::for_each( pool_r.byKindBegin(kind_r), pool_r.byKindEnd(kind_r), - std::mem_fun_ref(&PoolItem::saveState) ); + std::mem_fn(&PoolItem::saveState) ); } void restoreState( ResPool pool_r ) { std::for_each( pool_r.begin(), pool_r.end(), - std::mem_fun_ref(&PoolItem::restoreState) ); + std::mem_fn(&PoolItem::restoreState) ); } void restoreState( ResPool pool_r, const ResKind & kind_r ) { std::for_each( pool_r.byKindBegin(kind_r), pool_r.byKindEnd(kind_r), - std::mem_fun_ref(&PoolItem::restoreState) ); + std::mem_fn(&PoolItem::restoreState) ); } bool diffState( ResPool pool_r ) const { // return whether some PoolItem::sameState reported \c false. return( invokeOnEach( pool_r.begin(), pool_r.end(), - std::mem_fun_ref(&PoolItem::sameState) ) < 0 ); + std::mem_fn(&PoolItem::sameState) ) < 0 ); } bool diffState( ResPool pool_r, const ResKind & kind_r ) const { // return whether some PoolItem::sameState reported \c false. return( invokeOnEach( pool_r.byKindBegin(kind_r), pool_r.byKindEnd(kind_r), - std::mem_fun_ref(&PoolItem::sameState) ) < 0 ); + std::mem_fn(&PoolItem::sameState) ) < 0 ); } }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/SysContent.h new/libzypp-17.31.1/zypp/SysContent.h --- old/libzypp-17.31.0/zypp/SysContent.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/SysContent.h 2022-08-01 13:00:25.000000000 +0200 @@ -22,6 +22,15 @@ #include <zypp/Edition.h> #include <zypp/Date.h> +#ifdef YUILogComponent +// Work around https://github.com/libyui/libyui/issues/78 +// The hack here is needed to allow older libyui-qt-pkg building +// against current libzypp. Otherwise libyui builds for Code15.4 +// or older will break. +#define BOOST_BIND_GLOBAL_PLACEHOLDERS +#include <boost/bind.hpp> +#endif + /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/ZYppFactory.cc new/libzypp-17.31.1/zypp/ZYppFactory.cc --- old/libzypp-17.31.0/zypp/ZYppFactory.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/ZYppFactory.cc 2022-08-25 16:57:43.000000000 +0200 @@ -47,18 +47,25 @@ namespace zypp { ///////////////////////////////////////////////////////////////// - namespace + namespace sighandler { - void sigsegvHandler( int sig ); - ::sighandler_t lastSigsegvHandler = ::signal( SIGSEGV, sigsegvHandler ); - - /** SIGSEGV handler to log stack trace */ - void sigsegvHandler( int sig ) - { - INT << "Error: signal " << sig << endl << dumpBacktrace << endl; - base::LogControl::instance().emergencyShutdown(); - ::signal( SIGSEGV, lastSigsegvHandler ); - } + /// Signal handler logging a stack trace + template <int SIG> + class SigBacktraceHandler + { + static void backtraceHandler( int sig ) { + INT << "Error: signal " << SIG << endl << dumpBacktrace << endl; + base::LogControl::instance().emergencyShutdown(); + ::signal( SIG, lastSigHandler ); + } + static ::sighandler_t lastSigHandler; + }; + template <int SIG> + ::sighandler_t SigBacktraceHandler<SIG>::lastSigHandler { ::signal( SIG, SigBacktraceHandler::backtraceHandler ) }; + + // Explicit instantiation installs the handler: + template class SigBacktraceHandler<SIGSEGV>; + template class SigBacktraceHandler<SIGABRT>; } namespace env @@ -155,7 +162,7 @@ { _openLockFile(); return ScopedGuard( static_cast<void*>(0), - bind( mem_fun_ref( &ZYppGlobalLock::_closeLockFile ), ref(*this) ) ); + std::bind( std::mem_fn( &ZYppGlobalLock::_closeLockFile ), this ) ); } /** Use \ref accessLockFile. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/base/Functional.h new/libzypp-17.31.1/zypp/base/Functional.h --- old/libzypp-17.31.0/zypp/base/Functional.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/base/Functional.h 2022-07-29 11:57:20.000000000 +0200 @@ -12,177 +12,16 @@ #ifndef ZYPP_BASE_FUNCTIONAL_H #define ZYPP_BASE_FUNCTIONAL_H -#include <boost/functional.hpp> - +#include <functional> #include <zypp/base/Function.h> /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// - /* http://www.boost.org/libs/functional/mem_fun.html - - The header functional.hpp includes improved versions of - the full range of member function adapters from the - C++ Standard Library. - */ - using boost::mem_fun; - using boost::mem_fun_ref; - /////////////////////////////////////////////////////////////////// namespace functor { ///////////////////////////////////////////////////////////////// - - /** An unary functor forwarding to some other <tt>TFunctor &</tt>. - * \ingroup g_Functor - * - * Most algorithms take functor arguments by value. That's inconvenient - * if the functor wants to collect and return data. Creating and - * passing a \ref FunctorRef to the algorithm, may help you out of this. - * - * \code - * // Counts invokations of operator(). - * template<class Tp> - * struct Counter : public std::unary_function<Tp, void> - * { - * void operator()( Tp ) - * { ++_value; } - * - * Counter() : _value( 0 ) {} - * - * unsigned _value; - * }; - * - * std::set<SomeType> c; - * Counter<SomeType> counter; - * // Invokations of FunctorRef are forwarded to counter: - * std::for_each( c.begin, c.end(), - * // currently you must specify the - * // operator() signature: - * functorRef<void,SomeType>(counter) - * ); - * \endcode - * - * \note FunctorRef must be able to deduce the signature of - * \c TFunctor::operator(). This is currently not automated, - * so you must specify the operator() signature as template - * arguments. - * - * \note The order is <result_type, arg1_type, ...> (this - * differs from std::, where the result comes last). - * - * \todo drop it an use boost::ref - */ - - ///////////////////////////////////////////////////////////////// - namespace functor_detail - { - template <class TFunctor, class res_type> - struct FunctorRef0 - { - FunctorRef0( TFunctor & f_r ) - : _f( f_r ) - {} - - res_type operator()() const - { - return _f(); - } - - private: - TFunctor & _f; - }; - - template <class TFunctor, class res_type, class arg1_type> - struct FunctorRef1 : public std::unary_function<arg1_type, res_type> - { - FunctorRef1( TFunctor & f_r ) - : _f( f_r ) - {} - - res_type operator()( arg1_type a1 ) const - { - return _f( a1 ); - } - - private: - TFunctor & _f; - }; - - template <class TFunctor, class res_type, class arg1_type, class arg2_type> - struct FunctorRef2 : public std::binary_function<arg1_type, arg2_type, res_type> - { - FunctorRef2( TFunctor & f_r ) - : _f( f_r ) - {} - - res_type operator()( arg1_type a1, arg2_type a2 ) const - { - return _f( a1, a2 ); - } - - private: - TFunctor & _f; - }; - - struct nil - {}; - } - ///////////////////////////////////////////////////////////////// - - /** A binary \ref FunctorRef. - * Create it using \ref functorRef convenience function. - */ - template <class TFunctor, class res_type, class arg1_type = functor_detail::nil, - class arg2_type = functor_detail::nil> - struct FunctorRef - : public functor_detail::FunctorRef2<TFunctor, res_type, arg1_type, arg2_type> - { - FunctorRef( TFunctor & f_r ) - : functor_detail::FunctorRef2<TFunctor, res_type, arg1_type, arg2_type>( f_r ) - {} - }; - - /** A unary \ref FunctorRef. - * Create it using \ref functorRef convenience function. - */ - template <class TFunctor, class res_type, class arg1_type> - struct FunctorRef<TFunctor, res_type, arg1_type> - : public functor_detail::FunctorRef1<TFunctor, res_type, arg1_type> - { - FunctorRef( TFunctor & f_r ) - : functor_detail::FunctorRef1<TFunctor, res_type, arg1_type>( f_r ) - {} - }; - - /** A nullary \ref FunctorRef. - * Create it using \ref functorRef convenience function. - */ - template <class TFunctor, class res_type> - struct FunctorRef<TFunctor, res_type> - : public functor_detail::FunctorRef0<TFunctor, res_type> - { - FunctorRef( TFunctor & f_r ) - : functor_detail::FunctorRef0<TFunctor, res_type>( f_r ) - {} - }; - - /** Convenience function creating a binary \ref FunctorRef. */ - template <class res_type, class arg1_type, class arg2_type, class TFunctor> - FunctorRef<TFunctor, res_type, arg1_type, arg2_type> - functorRef( TFunctor & f_r ) - { return FunctorRef<TFunctor, res_type, arg1_type, arg2_type>( f_r ); } - template <class res_type, class arg1_type, class TFunctor> - FunctorRef<TFunctor, res_type, arg1_type> - functorRef( TFunctor & f_r ) - { return FunctorRef<TFunctor, res_type, arg1_type>( f_r ); } - template <class res_type, class TFunctor> - FunctorRef<TFunctor, res_type> - functorRef( TFunctor & f_r ) - { return FunctorRef<TFunctor, res_type>( f_r ); } - - ///////////////////////////////////////////////////////////////// - /** \defgroup LOGICALFILTERS Functors for building compex queries. * \ingroup g_Functor * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/base/ValueTransform.h new/libzypp-17.31.1/zypp/base/ValueTransform.h --- old/libzypp-17.31.0/zypp/base/ValueTransform.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/base/ValueTransform.h 2022-07-29 11:57:20.000000000 +0200 @@ -36,7 +36,7 @@ { typedef Tp RawType; typedef TUnaryFunction Transformator; - typedef typename Transformator::result_type TransformedType; + typedef typename std::result_of<Transformator(RawType)>::type TransformedType; public: ValueTransform() @@ -94,7 +94,7 @@ typedef TUnaryFunction Transformator; typedef typename Container::size_type size_type; typedef typename Container::value_type RawType; - typedef typename Transformator::result_type TransformedType; + typedef typename std::result_of<Transformator(RawType)>::type TransformedType; public: ContainerTransform() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/misc/LoadTestcase.cc new/libzypp-17.31.1/zypp/misc/LoadTestcase.cc --- old/libzypp-17.31.0/zypp/misc/LoadTestcase.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/misc/LoadTestcase.cc 2022-08-24 15:08:49.000000000 +0200 @@ -77,9 +77,8 @@ const std::string &TestcaseTrial::Node::getProp( const std::string &name, const std::string &def ) const { - if ( _pimpl->properties.find( name) == _pimpl->properties.end() ) - return def; - return _pimpl->properties.at( name ); + auto it { _pimpl->properties.find( name ) }; + return it == _pimpl->properties.end() ? def : it->second; } const std::map<std::string, std::string> &TestcaseTrial::Node::properties() const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/parser/ProductFileReader.cc new/libzypp-17.31.1/zypp/parser/ProductFileReader.cc --- old/libzypp-17.31.0/zypp/parser/ProductFileReader.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/parser/ProductFileReader.cc 2022-07-29 11:57:20.000000000 +0200 @@ -149,7 +149,7 @@ ("arch", MANDTAORY, xml::parseDefAssign( _pdata._arch ) ) ("shortsummary", OPTIONAL, xml::parseDefAssign( _pdata._shortName ) ) ("summary", MULTIPLE_OPTIONAL, xml::parseDefAssign( _ttext )( "lang", _tlocale ) - >>bind( &ProductNode::doneLocalizedDefault, this, _1, boost::ref(_pdata._summary) )) + >>std::bind( std::mem_fn(&ProductNode::doneLocalizedDefault), this, _1, std::ref(_pdata._summary) )) ("productline", OPTIONAL, xml::parseDefAssign( _pdata._productline ) ) ("register", OPTIONAL) ("updaterepokey", OPTIONAL, xml::parseDefAssign( _pdata._updaterepokey ) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/pool/PoolStats.h new/libzypp-17.31.1/zypp/pool/PoolStats.h --- old/libzypp-17.31.0/zypp/pool/PoolStats.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/pool/PoolStats.h 2022-07-29 11:57:20.000000000 +0200 @@ -41,7 +41,7 @@ * system: 1 * \endcode */ - struct PoolStats : public std::unary_function<ResObject::constPtr, void> + struct PoolStats { void operator()( ResObject::constPtr ptr ) { @@ -71,8 +71,7 @@ TIterator begin_r, TIterator end_r ) { pool::PoolStats stats; - std::for_each( begin_r, end_r, - functor::functorRef<void,ResObject::constPtr>(stats) ); + std::for_each( begin_r, end_r, std::ref(stats) ); return str << stats; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/pool/PoolTraits.h new/libzypp-17.31.1/zypp/pool/PoolTraits.h --- old/libzypp-17.31.0/zypp/pool/PoolTraits.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/pool/PoolTraits.h 2022-07-29 11:57:20.000000000 +0200 @@ -43,10 +43,10 @@ { return bool(pi); } }; - /** In CXX0X std::_Select2nd does no longer derive from std::unary_function + /** std::_Select2nd */ template<typename TPair> - struct P_Select2nd : public std::unary_function<TPair, typename TPair::second_type> + struct P_Select2nd { typename TPair::second_type& operator()(TPair& __x) const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/repo/Downloader.cc new/libzypp-17.31.1/zypp/repo/Downloader.cc --- old/libzypp-17.31.0/zypp/repo/Downloader.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/repo/Downloader.cc 2022-07-29 11:57:20.000000000 +0200 @@ -194,7 +194,7 @@ { INT << "Oops!" << endl; } }); } - checkers.add( ref(sigchecker) ); // ref() to the local sigchecker is important as we want back fileValidated! + checkers.add( std::ref(sigchecker) ); // ref() to the local sigchecker is important as we want back fileValidated! } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/repo/PackageProvider.cc new/libzypp-17.31.1/zypp/repo/PackageProvider.cc --- old/libzypp-17.31.0/zypp/repo/PackageProvider.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/repo/PackageProvider.cc 2022-07-29 11:57:20.000000000 +0200 @@ -350,8 +350,8 @@ // scope (cast required as reset is overloaded). We want report to end // when leaving providePackage and not wait for *this going out of scope. return shared_ptr<void>( static_cast<void*>(0), - bind( mem_fun_ref( static_cast<void (shared_ptr<Report>::*)()>(&shared_ptr<Report>::reset) ), - ref(_report) ) ); + std::bind( std::mem_fn(static_cast<void (shared_ptr<Report>::*)()>(&shared_ptr<Report>::reset)), + std::ref(_report) ) ); } mutable bool _retry; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/repo/RepoProvideFile.cc new/libzypp-17.31.1/zypp/repo/RepoProvideFile.cc --- old/libzypp-17.31.0/zypp/repo/RepoProvideFile.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/repo/RepoProvideFile.cc 2022-07-29 11:57:20.000000000 +0200 @@ -242,7 +242,7 @@ // Arrange DownloadFileReportHack to recieve the source::DownloadFileReport // and redirect download progress triggers to call the ProvideFilePolicy // callback. - DownloadFileReportHack dumb( bind( mem_fun_ref( &ProvideFilePolicy::progress ), ref( policy_r ), _1 ) ); + DownloadFileReportHack dumb( std::bind( std::mem_fn(&ProvideFilePolicy::progress), std::ref(policy_r), _1 ) ); RepoException repo_excpt(repo_r, str::form(_("Can't provide file '%s' from repository '%s'"), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/repo/RepoVariables.h new/libzypp-17.31.1/zypp/repo/RepoVariables.h --- old/libzypp-17.31.0/zypp/repo/RepoVariables.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/repo/RepoVariables.h 2022-07-29 11:57:20.000000000 +0200 @@ -102,7 +102,7 @@ * * \see \ref RepoVarExpand for supported variable syntax. */ - struct RepoVariablesStringReplacer : public std::unary_function<const std::string &, std::string> + struct RepoVariablesStringReplacer { std::string operator()( const std::string & value_r ) const; @@ -116,7 +116,7 @@ * Replaces repository variables in the URL (except for user/pass inside authority) * \see RepoVariablesStringReplacer */ - struct RepoVariablesUrlReplacer : public std::unary_function<const Url &, Url> + struct RepoVariablesUrlReplacer { Url operator()( const Url & url_r ) const; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/sat/Solvable.cc new/libzypp-17.31.1/zypp/sat/Solvable.cc --- old/libzypp-17.31.0/zypp/sat/Solvable.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/sat/Solvable.cc 2022-07-29 11:57:20.000000000 +0200 @@ -609,9 +609,7 @@ } break; - case CapDetail::REL_NONE: - case CapDetail::CAP_WITH: - case CapDetail::CAP_ARCH: + default: break; // unwanted } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/sat/detail/PoolImpl.cc new/libzypp-17.31.1/zypp/sat/detail/PoolImpl.cc --- old/libzypp-17.31.0/zypp/sat/detail/PoolImpl.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/sat/detail/PoolImpl.cc 2022-07-29 11:57:20.000000000 +0200 @@ -588,9 +588,7 @@ } break; - case CapDetail::REL_NONE: - case CapDetail::CAP_WITH: - case CapDetail::CAP_ARCH: + default: break; // unwanted } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/solver/detail/Resolver.cc new/libzypp-17.31.1/zypp/solver/detail/Resolver.cc --- old/libzypp-17.31.0/zypp/solver/detail/Resolver.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/solver/detail/Resolver.cc 2022-07-29 11:57:20.000000000 +0200 @@ -266,7 +266,7 @@ //--------------------------------------------------------------------------- -struct UndoTransact : public resfilter::PoolItemFilterFunctor +struct UndoTransact { ResStatus::TransactByValue resStatus; UndoTransact ( const ResStatus::TransactByValue &status) @@ -281,7 +281,7 @@ }; -struct DoTransact : public resfilter::PoolItemFilterFunctor +struct DoTransact { ResStatus::TransactByValue resStatus; DoTransact ( const ResStatus::TransactByValue &status) @@ -306,7 +306,7 @@ invokeOnEach ( _pool.begin(), _pool.end(), resfilter::ByTransact( ), // Resetting all transcations - functor::functorRef<bool,PoolItem>(resetting) ); + std::ref(resetting) ); return resolvePool(); } @@ -320,7 +320,7 @@ MIL << "*** undo ***" << endl; invokeOnEach ( _pool.begin(), _pool.end(), resfilter::ByTransact( ), // collect transacts from Pool to resolver queue - functor::functorRef<bool,PoolItem>(info) ); + std::ref(info) ); // Regard dependencies of the item weak onl _addWeak.clear(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/solver/detail/SATResolver.cc new/libzypp-17.31.1/zypp/solver/detail/SATResolver.cc --- old/libzypp-17.31.0/zypp/solver/detail/SATResolver.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/solver/detail/SATResolver.cc 2022-07-29 11:57:20.000000000 +0200 @@ -369,7 +369,7 @@ /// On the fly it clears all PoolItem bySolver/ByApplLow status. /// The lists are cleared in the Ctor, populated by \ref operator(). ///////////////////////////////////////////////////////////////////////// -struct SATCollectTransact : public resfilter::PoolItemFilterFunctor +struct SATCollectTransact { SATCollectTransact( PoolItemList & items_to_install_r, PoolItemList & items_to_remove_r, @@ -436,7 +436,7 @@ //---------------------------------------------------------------------------- -class CheckIfUpdate : public resfilter::PoolItemFilterFunctor +class CheckIfUpdate { public: bool is_updated; @@ -596,7 +596,7 @@ invokeOnEach( _pool.byIdentBegin( poolItem ), _pool.byIdentEnd( poolItem ), resfilter::ByUninstalled(), // ByUninstalled - functor::functorRef<bool,PoolItem> (info) ); + std::ref(info) ); if (info.is_updated) { SATSolutionToPool( poolItem, ResStatus::toBeUninstalledDueToUpgrade, ResStatus::SOLVER ); @@ -689,7 +689,7 @@ // clear and rebuild: _items_to_install, _items_to_remove, _items_to_lock, _items_to_keep { SATCollectTransact collector( _items_to_install, _items_to_remove, _items_to_lock, _items_to_keep, solveSrcPackages() ); - invokeOnEach ( _pool.begin(), _pool.end(), functor::functorRef<bool,PoolItem>( collector ) ); + invokeOnEach ( _pool.begin(), _pool.end(), std::ref( collector ) ); } for (PoolItemList::const_iterator iter = weakItems.begin(); iter != weakItems.end(); iter++) { @@ -948,7 +948,7 @@ invokeOnEach( _pool.byIdentBegin( poolItem ), _pool.byIdentEnd( poolItem ), resfilter::ByUninstalled(), // ByUninstalled - functor::functorRef<bool,PoolItem> (info) ); + std::ref(info) ); if (info.is_updated) { SATSolutionToPool (poolItem, ResStatus::toBeUninstalledDueToUpgrade , ResStatus::SOLVER); @@ -981,7 +981,7 @@ // helper function //---------------------------------------------------------------------------- -struct FindPackage : public resfilter::ResObjectFilterFunctor +struct FindPackage { ProblemSolutionCombi *problemSolution; TransactionKind action; @@ -1371,7 +1371,7 @@ _pool.byIdentEnd( ident ), functor::chain (resfilter::ByInstalled (), // ByInstalled resfilter::ByTransact ()), // will be deinstalled - functor::functorRef<bool,PoolItem> (info) ); + std::ref(info) ); SolverQueueItemDelete_Ptr del = new SolverQueueItemDelete(_pool, ident.asString(), false ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/target/TargetImpl.cc new/libzypp-17.31.1/zypp/target/TargetImpl.cc --- old/libzypp-17.31.0/zypp/target/TargetImpl.cc 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/target/TargetImpl.cc 2022-07-29 11:57:20.000000000 +0200 @@ -896,7 +896,7 @@ try { updateFileContent( idpath, - boost::bind(fileMissing, idpath), + std::bind(fileMissing, idpath), generateRandomId ); } catch ( const Exception &e ) @@ -2395,7 +2395,7 @@ while ( msgSource->bytesAvailable() ) { if ( pendingMessageSize == 0 ) { - if ( msgSource->bytesAvailable() >= sizeof( zyppng::rpc::HeaderSizeType ) ) { + if ( std::size_t(msgSource->bytesAvailable()) >= sizeof( zyppng::rpc::HeaderSizeType ) ) { msgSource->read( reinterpret_cast<char *>( &pendingMessageSize ), sizeof( zyppng::rpc::HeaderSizeType ) ); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/ui/SelFilters.h new/libzypp-17.31.1/zypp/ui/SelFilters.h --- old/libzypp-17.31.0/zypp/ui/SelFilters.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/ui/SelFilters.h 2022-07-29 11:57:20.000000000 +0200 @@ -27,10 +27,8 @@ namespace selfilter { ///////////////////////////////////////////////////////////////// - typedef std::unary_function<Selectable::constPtr,bool> SelectableFilterFunctor; - /** */ - struct ByKind : public SelectableFilterFunctor + struct ByKind { ByKind( const ResKind & kind_r ) : _kind( kind_r ) @@ -45,7 +43,7 @@ }; /** */ - struct ByName : public SelectableFilterFunctor + struct ByName { ByName( const std::string & name_r ) : _name( name_r ) @@ -58,20 +56,20 @@ }; /** */ - struct ByHasInstalledObj : public SelectableFilterFunctor + struct ByHasInstalledObj { bool operator()( const ui::Selectable::constPtr & obj ) const { return obj && !obj->installedEmpty(); } }; /** */ - struct ByHasCandidateObj : public SelectableFilterFunctor + struct ByHasCandidateObj { bool operator()( const ui::Selectable::constPtr & obj ) const { return obj && obj->hasCandidateObj(); } }; - struct ByStatus : public SelectableFilterFunctor + struct ByStatus /** */ { ByStatus( Status status_r ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp/ui/SelectableTraits.h new/libzypp-17.31.1/zypp/ui/SelectableTraits.h --- old/libzypp-17.31.0/zypp/ui/SelectableTraits.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp/ui/SelectableTraits.h 2022-07-29 11:57:20.000000000 +0200 @@ -41,7 +41,7 @@ * \li newer buildtime * \li ResObject::constPtr as fallback. */ - struct AVOrder : public std::binary_function<PoolItem,PoolItem,bool> + struct AVOrder { // NOTE: operator() provides LESS semantics to order the set. // So LESS means 'prior in set'. We want 'better' archs and @@ -91,7 +91,7 @@ * \li newer install time * \li ResObject::constPtr as fallback. */ - struct IOrder : public std::binary_function<PoolItem,PoolItem,bool> + struct IOrder { // NOTE: operator() provides LESS semantics to order the set. // So LESS means 'prior in set'. We want 'newer' install time diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp-core/base/Function.h new/libzypp-17.31.1/zypp-core/base/Function.h --- old/libzypp-17.31.0/zypp-core/base/Function.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp-core/base/Function.h 2022-07-29 11:57:20.000000000 +0200 @@ -12,10 +12,8 @@ #ifndef ZYPP_BASE_FUNCTION_H #define ZYPP_BASE_FUNCTION_H +#include <functional> #include <boost/function.hpp> -#define BOOST_BIND_GLOBAL_PLACEHOLDERS -#include <boost/bind.hpp> -#include <boost/ref.hpp> /////////////////////////////////////////////////////////////////// namespace zypp @@ -42,36 +40,10 @@ */ using boost::function; - /* http://www.boost.org/libs/bind/bind.html - - boost::bind is a generalization of the standard functions std::bind1st - and std::bind2nd. It supports arbitrary function objects, functions, - function pointers, and member function pointers, and is able to bind - any argument to a specific value or route input arguments into arbitrary - positions. bind does not place any requirements on the function object; - in particular, it does not need the result_type, first_argument_type and - second_argument_type standard typedefs. - */ - using boost::bind; - - /* http://www.boost.org/doc/html/ref.html - - The Ref library is a small library that is useful for passing references - to function templates (algorithms) that would usually take copies of their - arguments. It defines the class template boost::reference_wrapper<T>, the - two functions boost::ref and boost::cref that return instances of - boost::reference_wrapper<T>, and the two traits classes - boost::is_reference_wrapper<T> and boost::unwrap_reference<T>. - - The purpose of boost::reference_wrapper<T> is to contain a reference to an - object of type T. It is primarily used to "feed" references to function - templates (algorithms) that take their parameter by value. - - To support this usage, boost::reference_wrapper<T> provides an implicit - conversion to T&. This usually allows the function templates to work on - references unmodified. - */ - using boost::ref; + using std::bind; + using std::placeholders::_1; + using std::placeholders::_2; + using std::placeholders::_3; ///////////////////////////////////////////////////////////////// } // namespace zypp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp-core/base/Iterator.h new/libzypp-17.31.1/zypp-core/base/Iterator.h --- old/libzypp-17.31.0/zypp-core/base/Iterator.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp-core/base/Iterator.h 2022-07-29 11:57:20.000000000 +0200 @@ -152,7 +152,7 @@ * \see MapKVIteratorTraits */ template<class TPair> - struct GetPairFirst : public std::unary_function<TPair, const typename TPair::first_type &> + struct GetPairFirst { const typename TPair::first_type & operator()( const TPair & pair_r ) const { return pair_r.first; } @@ -162,7 +162,7 @@ * \see MapKVIteratorTraits */ template<class TPair> - struct GetPairSecond : public std::unary_function<TPair, const typename TPair::second_type &> + struct GetPairSecond { const typename TPair::second_type & operator()( const TPair & pair_r ) const { return pair_r.second; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.31.0/zypp-core/base/LogTools.h new/libzypp-17.31.1/zypp-core/base/LogTools.h --- old/libzypp-17.31.0/zypp-core/base/LogTools.h 2022-07-07 14:19:45.000000000 +0200 +++ new/libzypp-17.31.1/zypp-core/base/LogTools.h 2022-07-29 11:57:20.000000000 +0200 @@ -241,7 +241,7 @@ typedef typename TMap::value_type PairType; typedef MapEntry<PairType> MapEntryType; - struct Transformer : public std::unary_function<PairType, MapEntryType> + struct Transformer { MapEntryType operator()( const PairType & pair_r ) const { return mapEntry( pair_r ); }