From 6f3c891e17c963b27a828134fe4876efce9e7cb1 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 2 Sep 2019 16:18:12 +0900 Subject: [PATCH] Imported Upstream version 17.8.1 --- CMakeLists.txt | 3 +++ VERSION.cmake | 4 ++-- libzypp.spec.cmake | 3 +++ needreboot | 14 ++++++++++++++ package/libzypp.changes | 8 ++++++++ po/zh_CN.po | 4 ++-- zypp/RepoInfo.cc | 1 + zypp/ZYppCallbacks.h | 1 - zypp/base/Gettext.h | 16 ++++++++++++++-- zypp/sat/detail/PoolMember.h | 28 +++++++++++++++++++++++++++- zypp/target/hal/HalContext.cc | 18 ++++++++++++++++-- zypp/target/hal/HalException.h | 18 +++--------------- 12 files changed, 93 insertions(+), 25 deletions(-) create mode 100644 needreboot diff --git a/CMakeLists.txt b/CMakeLists.txt index 10dc97d..3f2ec3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,6 +234,9 @@ INSTALL( FILES ${LIBZYPP_SOURCE_DIR}/cmake/modules/ZyppCommon.cmake DESTINATION MESSAGE(STATUS "zypp.conf will be installed in ${SYSCONFDIR}/zypp") INSTALL( FILES ${LIBZYPP_SOURCE_DIR}/zypp.conf DESTINATION ${SYSCONFDIR}/zypp ) +MESSAGE(STATUS "needreboot will be installed in /var/lib/zypp/") +INSTALL( FILES ${LIBZYPP_SOURCE_DIR}/needreboot DESTINATION /var/lib/zypp ) + #install systemCheck MESSAGE(STATUS "systemCheck will be installed in ${SYSCONFDIR}/zypp") INSTALL( FILES ${LIBZYPP_SOURCE_DIR}/systemCheck DESTINATION ${SYSCONFDIR}/zypp ) diff --git a/VERSION.cmake b/VERSION.cmake index 3df0591..d7ecb6c 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "17") SET(LIBZYPP_COMPATMINOR "2") SET(LIBZYPP_MINOR "8") -SET(LIBZYPP_PATCH "0") +SET(LIBZYPP_PATCH "1") # -# LAST RELEASED: 17.8.0 (2) +# LAST RELEASED: 17.8.1 (2) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff --git a/libzypp.spec.cmake b/libzypp.spec.cmake index 9532d56..291aa39 100644 --- a/libzypp.spec.cmake +++ b/libzypp.spec.cmake @@ -241,6 +241,7 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins/services mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins/system mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins/urlresolver mkdir -p $RPM_BUILD_ROOT%{_var}/lib/zypp +mkdir -p $RPM_BUILD_ROOT%{_var}/lib/zypp/needreboot.d mkdir -p $RPM_BUILD_ROOT%{_var}/log/zypp mkdir -p $RPM_BUILD_ROOT%{_var}/cache/zypp @@ -349,6 +350,8 @@ rm -rf "$RPM_BUILD_ROOT" %config(noreplace) %{_sysconfdir}/zypp/systemCheck %config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr %dir %{_var}/lib/zypp +%config(noreplace) %{_var}/lib/zypp/needreboot +%dir %{_var}/lib/zypp/needreboot.d %dir %{_var}/log/zypp %dir %{_var}/cache/zypp %{_prefix}/lib/zypp diff --git a/needreboot b/needreboot new file mode 100644 index 0000000..3b467b9 --- /dev/null +++ b/needreboot @@ -0,0 +1,14 @@ +# This file contains the default list of packages +# which will trigger the needreboot hint. +# Do not edit this file, instead use the needreboot.d +# directory for adding additional packages to the list +kernel-default +kernel-default-base +kernel-firmware +glibc +systemd +udev +libopenssl1_0_0 +libopenssl1_1 +gnutls +dbus-1 diff --git a/package/libzypp.changes b/package/libzypp.changes index 50a06c8..d2dbeeb 100644 --- a/package/libzypp.changes +++ b/package/libzypp.changes @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Mon Oct 29 12:20:40 CET 2018 - ma@suse.de + +- Adapt to changed type names in libsolv-0.7 +- Package needreboot file (fate#326451) +- Fix definitions of gettext macros (fixes #135) +- version 17.8.1 (2) + +------------------------------------------------------------------- Fri Oct 12 14:01:19 CEST 2018 - ma@suse.de - Add infrastructure to flag specific packages to trigger a diff --git a/po/zh_CN.po b/po/zh_CN.po index cf64cd6..25be1be 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: YaST (@memory@)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-08-03 11:09+0200\n" -"PO-Revision-Date: 2018-09-01 06:01+0000\n" +"PO-Revision-Date: 2018-10-13 06:01+0000\n" "Last-Translator: H. Zeng \n" "Language-Team: Chinese (China) " "\n" @@ -4190,7 +4190,7 @@ msgstr "访问 '%s' 时超时。" #: zypp/media/MediaException.cc:195 #, c-format, boost-format msgid "Downloaded data exceeded the expected filesize '%s' of '%s'." -msgstr "下载到的数据超出了 '%2$s' 中预期的文件大小 '%1$s'。" +msgstr "下载到的数据超出了预期文件大小 '%s'/'%s'。" #: zypp/media/MediaException.cc:203 #, c-format, boost-format diff --git a/zypp/RepoInfo.cc b/zypp/RepoInfo.cc index bd9a3f6..0a3575b 100644 --- a/zypp/RepoInfo.cc +++ b/zypp/RepoInfo.cc @@ -13,6 +13,7 @@ #include #include +#include "zypp/base/Gettext.h" #include "zypp/base/LogTools.h" #include "zypp/base/DefaultIntegral.h" #include "zypp/parser/xml/XmlEscape.h" diff --git a/zypp/ZYppCallbacks.h b/zypp/ZYppCallbacks.h index e920126..667e8a4 100644 --- a/zypp/ZYppCallbacks.h +++ b/zypp/ZYppCallbacks.h @@ -12,7 +12,6 @@ #ifndef ZYPP_ZYPPCALLBACKS_H #define ZYPP_ZYPPCALLBACKS_H -#include "zypp/base/Gettext.h" #include "zypp/base/EnumClass.h" #include "zypp/Callback.h" #include "zypp/UserData.h" diff --git a/zypp/base/Gettext.h b/zypp/base/Gettext.h index 8bbcc87..4457131 100644 --- a/zypp/base/Gettext.h +++ b/zypp/base/Gettext.h @@ -14,22 +14,34 @@ #ifndef ZYPP_BASE_GETTEXT_H #define ZYPP_BASE_GETTEXT_H +#ifdef ZYPP_DLL //defined if zypp is compiled as DLL + /** Just tag text for translation. */ +#undef N_ #define N_(MSG) MSG -#ifdef ZYPP_DLL //defined if zypp is compiled as DLL - /** Return translated text. */ +#undef _ #define _(MSG) ::zypp::gettext::dgettext( MSG ) /** Return translated text (plural form). */ +#undef PL_ #define PL_(MSG1,MSG2,N) ::zypp::gettext::dngettext( MSG1, MSG2, N ) #else + +#ifndef N_ +#define N_(MSG) MSG +#endif +#ifndef _ #define _(MSG) ::gettext( MSG ) +#endif +#ifndef PL_ #define PL_(MSG1,MSG2,N) ::ngettext( MSG1, MSG2, N ) #endif +#endif + /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// diff --git a/zypp/sat/detail/PoolMember.h b/zypp/sat/detail/PoolMember.h index 9573098..ecb28a9 100644 --- a/zypp/sat/detail/PoolMember.h +++ b/zypp/sat/detail/PoolMember.h @@ -12,6 +12,8 @@ #ifndef ZYPP_SAT_DETAIL_POOLMEMBER_H #define ZYPP_SAT_DETAIL_POOLMEMBER_H +#include + #include "zypp/base/Hash.h" #include "zypp/base/Iterator.h" #include "zypp/base/String.h" @@ -20,6 +22,17 @@ extern "C" { // Those _Type names are exposed as sat::detail::CType below! +#if ( LIBSOLV_VERSION >= 700 ) + struct s_Dataiterator; + struct s_Datamatcher; + struct s_Map; + struct s_Pool; + struct s_Queue; + struct s_Repo; + struct s_Solvable; + struct s_Solver; + struct s_Transaction; +#else struct _Dataiterator; struct _Datamatcher; struct _Map; @@ -29,6 +42,7 @@ extern "C" struct _Solvable; struct _Solver; struct _Transaction; +#endif } /////////////////////////////////////////////////////////////////// @@ -55,6 +69,17 @@ namespace zypp /////////////////////////////////////////////////////////////////// namespace detail { +#if ( LIBSOLV_VERSION >= 700 ) + typedef ::s_Dataiterator CDataiterator; ///< Wrapped libsolv C data type exposed as backdoor + typedef ::s_Datamatcher CDatamatcher; ///< Wrapped libsolv C data type exposed as backdoor + typedef ::s_Map CMap; ///< Wrapped libsolv C data type exposed as backdoor + typedef ::s_Pool CPool; ///< Wrapped libsolv C data type exposed as backdoor + typedef ::s_Queue CQueue; ///< Wrapped libsolv C data type exposed as backdoor + typedef ::s_Repo CRepo; ///< Wrapped libsolv C data type exposed as backdoor + typedef ::s_Solvable CSolvable; ///< Wrapped libsolv C data type exposed as backdoor + typedef ::s_Solver CSolver; ///< Wrapped libsolv C data type exposed as backdoor + typedef ::s_Transaction CTransaction; ///< Wrapped libsolv C data type exposed as backdoor +#else typedef ::_Dataiterator CDataiterator; ///< Wrapped libsolv C data type exposed as backdoor typedef ::_Datamatcher CDatamatcher; ///< Wrapped libsolv C data type exposed as backdoor typedef ::_Map CMap; ///< Wrapped libsolv C data type exposed as backdoor @@ -64,6 +89,7 @@ namespace zypp typedef ::_Solvable CSolvable; ///< Wrapped libsolv C data type exposed as backdoor typedef ::_Solver CSolver; ///< Wrapped libsolv C data type exposed as backdoor typedef ::_Transaction CTransaction; ///< Wrapped libsolv C data type exposed as backdoor +#endif } // namespace detail /////////////////////////////////////////////////////////////////// @@ -130,7 +156,7 @@ namespace zypp static const SolvableIdType systemSolvableId( 1 ); /** Id type to connect \ref Repo and sat-repo. */ - typedef ::_Repo * RepoIdType; + typedef CRepo * RepoIdType; /** Id to denote \ref Repo::noRepository. */ static const RepoIdType noRepoId( 0 ); diff --git a/zypp/target/hal/HalContext.cc b/zypp/target/hal/HalContext.cc index e9f49de..4c21ff8 100644 --- a/zypp/target/hal/HalContext.cc +++ b/zypp/target/hal/HalContext.cc @@ -10,6 +10,7 @@ * * \brief Hardware abstaction layer library wrapper implementation. */ +#include "zypp/base/Gettext.h" #include "zypp/target/hal/HalException.h" ////////////////////////////////////////////////////////////////////// namespace zypp @@ -20,8 +21,21 @@ namespace zypp ////////////////////////////////////////////////////////////////// namespace hal { //////////////////////////////////////////////////////////////// - NoHalException::NoHalException() - : Exception(_("Sorry, but this version of libzypp was built without HAL support.")) + HalException::HalException() + : zypp::Exception(_("Hal Exception")) + {} + HalException::HalException(const std::string &msg_r) + : zypp::Exception(_("Hal Exception")) + , e_name() + , e_msg(msg_r) + {} + HalException::HalException(const std::string &err_name, const std::string &err_msg) + : zypp::Exception(_("Hal Exception")) + , e_name(err_name) + , e_msg(err_msg) + {} + NoHalException::NoHalException() + : Exception(_("Sorry, but this version of libzypp was built without HAL support.")) {} //////////////////////////////////////////////////////////////// } // namespace hal diff --git a/zypp/target/hal/HalException.h b/zypp/target/hal/HalException.h index 6d9e05a..00865a7 100644 --- a/zypp/target/hal/HalException.h +++ b/zypp/target/hal/HalException.h @@ -14,10 +14,8 @@ #define ZYPP_TARGET_HAL_HALEXCEPTION_H #include "zypp/base/Exception.h" -#include "zypp/base/Gettext.h" #include "zypp/base/String.h" - ////////////////////////////////////////////////////////////////////// namespace zypp { //////////////////////////////////////////////////////////////////// @@ -42,29 +40,19 @@ namespace zypp /** Default constructor. * Use \ref ZYPP_THROW to throw exceptions. */ - HalException() - : zypp::Exception(_("Hal Exception")) - {} + HalException(); /** Constructor taking complete hal error message. * This constructor is used to generate custom error * messages, in case, that no DBUS error is avaliable. * Use \ref ZYPP_THROW to throw exceptions. */ - HalException(const std::string &msg_r) - : zypp::Exception(_("Hal Exception")) - , e_name() - , e_msg(msg_r) - {} + HalException(const std::string &msg_r); /** Constructor taking HAL (DBUS) error message components. * Use \ref ZYPP_THROW to throw exceptions. */ - HalException(const std::string &err_name, const std::string &err_msg) - : zypp::Exception(_("Hal Exception")) - , e_name(err_name) - , e_msg(err_msg) - {} + HalException(const std::string &err_name, const std::string &err_msg); /** Destructor. */ -- 2.7.4