Imported Upstream version 17.14.0 upstream/17.14.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:19:43 +0000 (16:19 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:19:43 +0000 (16:19 +0900)
68 files changed:
CMakeLists.txt
VERSION.cmake
package/libzypp.changes
zypp/Arch.h
zypp/CMakeLists.txt
zypp/Callback.h
zypp/CpeId.cc
zypp/KeyRing.h
zypp/Patch.h
zypp/Pattern.h
zypp/PluginFrame.h
zypp/PluginScript.h
zypp/PoolItem.h
zypp/PoolItemBest.h
zypp/ProblemSolution.h
zypp/PublicKey.cc
zypp/PublicKey.h
zypp/RepoInfo.h
zypp/RepoManager.h
zypp/RepoStatus.h
zypp/ResObject.h
zypp/ResPoolProxy.h
zypp/ResStatus.h
zypp/ResTraits.h
zypp/ResolverProblem.h
zypp/ServiceInfo.h
zypp/ZConfig.cc
zypp/ZYppFactory.cc
zypp/base/Easy.h
zypp/base/Exception.h
zypp/base/StrMatcher.h
zypp/base/Xml.cc [new file with mode: 0644]
zypp/media/CredentialManager.h
zypp/media/MediaCD.h
zypp/media/MediaCIFS.h
zypp/media/MediaCurl.cc
zypp/media/MediaCurl.h
zypp/media/MediaDIR.h
zypp/media/MediaDISK.h
zypp/media/MediaException.cc
zypp/media/MediaException.h
zypp/media/MediaISO.h
zypp/media/MediaManager.h
zypp/media/MediaMultiCurl.h
zypp/media/MediaNFS.h
zypp/media/MediaPlugin.h
zypp/media/UrlResolverPlugin.h
zypp/parser/HistoryLogReader.h
zypp/parser/ProductFileReader.h
zypp/parser/susetags/ContentFileReader.cc
zypp/parser/susetags/ContentFileReader.h
zypp/parser/xml/ParseDef.h
zypp/repo/DeltaCandidates.h
zypp/repo/PackageProvider.h
zypp/repo/RepoInfoBase.h
zypp/repo/ServiceRepos.h
zypp/sat/LookupAttr.h
zypp/sat/Map.cc
zypp/sat/SolvIterMixin.h
zypp/sat/Transaction.cc
zypp/sat/Transaction.h
zypp/sat/WhatProvides.h
zypp/sat/detail/PoolMember.h
zypp/solver/detail/Types.h
zypp/target/modalias/Modalias.h
zypp/ui/Selectable.h
zypp/zypp_detail/ZYppImpl.cc
zypp/zypp_detail/ZYppImpl.h

index ff17324..1c018ec 100644 (file)
@@ -15,6 +15,8 @@ OPTION (DISABLE_AUTODOCS "Do not require doxygen being installed (required to bu
 #--------------------------------------------------------------------------------
 SET (have_system x)
 
+set (CMAKE_CXX_STANDARD 14)
+
 IF (DEBIAN)
   MESSAGE (STATUS "Building for Debian")
   SET (ENABLE_BUILD_DOCS ON)
@@ -53,8 +55,8 @@ include(CheckCXXCompilerFlag)
 CHECK_C_COMPILER_FLAG("-Werror=format-security" CC_FORMAT_SECURITY)
 CHECK_CXX_COMPILER_FLAG("-Werror=format-security" CXX_FORMAT_SECURITY)
 
-SET( CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -fno-strict-aliasing -fPIC -g -rdynamic -Wall -Wl,-as-needed -Wp,-D_GLIBCXX_ASSERTIONS" )
-SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -fPIC -g -rdynamic -Wall -Wl,-as-needed -Wp,-D_GLIBCXX_ASSERTIONS" )
+SET( CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -fno-strict-aliasing -fPIC -g -Wall -Wp,-D_GLIBCXX_ASSERTIONS" )
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -fPIC -g -Wall -Wp,-D_GLIBCXX_ASSERTIONS" )
 
 SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden -Woverloaded-virtual -Wnon-virtual-dtor" )
 
@@ -69,6 +71,12 @@ IF(${CXX_FORMAT_SECURITY})
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=format-security")
 ENDIF(${CXX_FORMAT_SECURITY})
 
+if ( NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+  #cli args ignored by clang, it still prints a noisy warning though
+  SET( CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -rdynamic -Wl,-as-needed" )
+  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic -Wl,-as-needed" )
+endif()
+
 INCLUDE(CheckFunctionExists)
 CHECK_FUNCTION_EXISTS(pipe2 PIPE2_FOUND)
 IF(${PIPE2_FOUND})
index 33e3da1..98a5f9d 100644 (file)
@@ -60,9 +60,9 @@
 #
 SET(LIBZYPP_MAJOR "17")
 SET(LIBZYPP_COMPATMINOR "12")
-SET(LIBZYPP_MINOR "13")
+SET(LIBZYPP_MINOR "14")
 SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 17.13.0 (12)
+# LAST RELEASED: 17.14.0 (12)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index 938b7db..31fb4db 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Mon Aug  5 13:03:55 CEST 2019 - ma@suse.de
+
+- PublicKey::algoName: supply key algorithm and length
+- version 17.14.0 (12)
+
+-------------------------------------------------------------------
 Thu Jul 25 17:25:10 CEST 2019 - ma@suse.de
 
 - MediaCurl: Fix leaking filedescriptors (bsc#1116995)
index e781b19..d726671 100644 (file)
@@ -345,6 +345,9 @@ namespace std
 { /////////////////////////////////////////////////////////////////
   /** \relates zypp::Arch Default order for std::container based Arch::compare.*/
   template<>
+#ifdef __clang__
+constexpr
+#endif
     inline bool less<zypp::Arch>::operator()( const zypp::Arch & lhs, const zypp::Arch & rhs ) const
     { return lhs.compare( rhs ) < 0; }
   /////////////////////////////////////////////////////////////////
index 3d3629a..31adeb2 100644 (file)
@@ -224,6 +224,7 @@ SET( zypp_base_SRCS
   base/Sysconfig.cc
   base/ProfilingFormater.cc
   base/LogControl.cc
+  base/Xml.cc
 )
 
 SET( zypp_base_HEADERS
index 3baf8c0..99037f2 100644 (file)
@@ -161,7 +161,7 @@ namespace zypp
 
     /**  */
     template<class TReport>
-      class DistributeReport;
+      struct DistributeReport;
 
     /**  */
     template<class TReport>
index acce8b2..1496c1e 100644 (file)
@@ -75,6 +75,8 @@ namespace zypp
   } // namespace
   ///////////////////////////////////////////////////////////////////
 
+  constexpr CpeId::NoThrowType CpeId::noThrow;
+
   ///////////////////////////////////////////////////////////////////
   /// \class CpeId::Impl
   /// \brief CpeId implementation.
@@ -442,6 +444,9 @@ namespace zypp
   const CpeId::Value CpeId::Value::ANY;
   const CpeId::Value CpeId::Value::NA( "" );
 
+  constexpr CpeId::Value::FsFormatType CpeId::Value::fsFormat;
+  constexpr CpeId::Value::UriFormatType CpeId::Value::uriFormat;
+
   CpeId::Value::Value( const std::string & value_r )
   {
     if ( value_r.empty() )     // NA
index d230836..618be9b 100644 (file)
@@ -201,7 +201,7 @@ namespace zypp
 
   public:
     /** Implementation  */
-    class Impl;
+    struct Impl;
 
   public:
     /** Default ctor */
index b3d240b..14eb738 100644 (file)
@@ -15,6 +15,7 @@
 #include "zypp/base/Flags.h"
 #include "zypp/sat/SolvAttr.h"
 #include "zypp/ResObject.h"
+#include "zypp/sat/SolvableSet.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
index 6d94263..5daa650 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "zypp/ResObject.h"
 #include "zypp/Pathname.h"
+#include "zypp/sat/SolvableSet.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
index 96c7bad..cb44e63 100644 (file)
@@ -247,7 +247,7 @@ namespace zypp
 
     public:
       /** Implementation */
-      class Impl;
+      struct Impl;
     private:
       /** Pointer to implementation */
       RWCOW_pointer<Impl> _pimpl;
index fa64aa8..a2a40ff 100644 (file)
@@ -182,7 +182,7 @@ namespace zypp
 
     public:
       /** Implementation. */
-      class Impl;
+      struct Impl;
     private:
       /** Pointer to implementation. */
       RW_pointer<Impl> _pimpl;
index 922ad53..8b5e946 100644 (file)
@@ -144,7 +144,7 @@ namespace zypp
       void setBuddy( const sat::Solvable & solv_r );
       /** internal ctor */
     public:
-      class Impl;      ///< Expose type only
+      struct Impl;     ///< Expose type only
     private:
       explicit PoolItem( Impl * implptr_r );
       /** Pointer to implementation */
@@ -154,7 +154,7 @@ namespace zypp
       /** \name tmp hack for save/restore state. */
       /** \todo get rid of it. */
       //@{
-      friend class PoolItemSaver;
+      friend struct PoolItemSaver;
       void saveState() const;
       void restoreState() const;
       bool sameState() const;
index b4ebc6b..a93e134 100644 (file)
@@ -144,7 +144,7 @@ namespace zypp
       const Container & container() const;
     private:
       /** Implementation  */
-      class Impl;
+      struct Impl;
       /** Pointer to implementation */
       RWCOW_pointer<Impl> & pimpl()             { return *(reinterpret_cast<RWCOW_pointer<Impl>*>( _dont_use_this_use_pimpl.get() )); }
       /** Pointer to implementation */
index 56ee1ce..8144917 100644 (file)
@@ -92,7 +92,7 @@ namespace zypp
 
 
   private:
-    class Impl;
+    struct Impl;
     RWCOW_pointer<Impl> _pimpl;
   };
 
index 4580d7c..e251a39 100644 (file)
@@ -102,6 +102,15 @@ namespace zypp
       return ret;
     }
 
+    std::string keyAlgoName( const gpgme_subkey_t & key_r )
+    {
+      std::string ret;
+      if ( const char * n = ::gpgme_pubkey_algo_name( key_r->pubkey_algo ) )
+       ret = str::Str() << n << ' ' << key_r->length;
+      else
+       ret = "?";
+      return ret;
+    }
   } //namespace
   ///////////////////////////////////////////////////////////////////
 
@@ -190,6 +199,7 @@ namespace zypp
     std::string _id;
     std::string _name;
     std::string _fingerprint;
+    std::string _algoName;
     Date        _created;
     Date        _expires;
 
@@ -245,6 +255,7 @@ namespace zypp
 
       data->_expires = zypp::Date(sKey->expires);
       data->_fingerprint = str::asString(sKey->fpr);
+      data->_algoName = keyAlgoName( sKey );
       data->_id = str::asString(sKey->keyid);
 
       //get the primary user ID
@@ -298,6 +309,9 @@ namespace zypp
   std::string PublicKeyData::fingerprint() const
   { return _pimpl->_fingerprint; }
 
+  std::string PublicKeyData::algoName() const
+  {  return _pimpl->_algoName; }
+
   Date PublicKeyData::created() const
   { return _pimpl->_created; }
 
@@ -345,13 +359,14 @@ namespace zypp
   }
 
   PublicKeyData::AsciiArt PublicKeyData::asciiArt() const
-  { return AsciiArt( fingerprint() /* TODO: key algorithm could be added as top tile. */ ); }
+  { return AsciiArt( fingerprint(), algoName() ); }
 
   std::ostream & dumpOn( std::ostream & str, const PublicKeyData & obj )
   {
     str << "[" << obj.name() << "]" << endl;
     str << "  fpr " << obj.fingerprint() << endl;
     str << "   id " << obj.id() << endl;
+    str << "  alg " << obj.algoName() << endl;
     str << "  cre " << Date::ValueType(obj.created()) << ' ' << obj.created() << endl;
     str << "  exp " << Date::ValueType(obj.expires()) << ' ' << obj.expiresAsString() << endl;
     str << "  ttl " << obj.daysToLive() << endl;
@@ -515,6 +530,9 @@ namespace zypp
   std::string PublicKey::fingerprint() const
   { return keyData().fingerprint(); }
 
+  std::string PublicKey::algoName() const
+  { return keyData().algoName(); }
+
   Date PublicKey::created() const
   { return keyData().created(); }
 
index 9f00378..6b7a50f 100644 (file)
@@ -115,7 +115,7 @@ namespace zypp
     std::string asString() const;
 
   private:
-    class Impl;
+    struct Impl;
     RWCOW_pointer<Impl> _pimpl;
     friend class PublicKeyData;
     friend std::ostream & dumpOn( std::ostream & str, const PublicKeyData & obj );
@@ -157,6 +157,9 @@ namespace zypp
     /** Key fingerprint.*/
     std::string fingerprint() const;
 
+    /** Key algorithm string like `RSA 2048` */
+    std::string algoName() const;
+
     /** Creation / last modification date (latest selfsig). */
     Date created() const;
 
@@ -233,7 +236,7 @@ namespace zypp
     AsciiArt asciiArt() const;
 
   private:
-    class Impl;
+    struct Impl;
     RWCOW_pointer<Impl> _pimpl;
 
     friend class KeyManagerCtx;
@@ -273,7 +276,7 @@ namespace zypp
   {
   public:
     /** Implementation  */
-    class Impl;
+    struct Impl;
 
   public:
     /** Default ctor. */
@@ -311,6 +314,7 @@ namespace zypp
     std::string id() const;                    //!< \see \ref PublicKeyData
     std::string name() const;                  //!< \see \ref PublicKeyData
     std::string fingerprint() const;           //!< \see \ref PublicKeyData
+    std::string algoName() const;              //!< \see \ref PublicKeyData
     Date created() const;                      //!< \see \ref PublicKeyData
     Date expires() const;                      //!< \see \ref PublicKeyData
     std::string expiresAsString() const;       //!< \see \ref PublicKeyData
index 11f3f62..4c2804c 100644 (file)
@@ -541,7 +541,7 @@ namespace zypp
        */
       virtual std::ostream & dumpAsXmlOn( std::ostream & str, const std::string & content = "" ) const;
 
-      class Impl;
+      struct Impl;
     private:
       friend class RepoManager;
       /** Raw values for RepoManager */
index 5f14287..ac3e206 100644 (file)
@@ -108,7 +108,7 @@ namespace zypp
 
   public:
     /** Implementation  */
-    class Impl;
+    struct Impl;
 
     /** ServiceInfo typedefs */
     typedef std::set<ServiceInfo> ServiceSet;
index 587a507..1eaa2da 100644 (file)
@@ -77,7 +77,7 @@ namespace zypp
     Date timestamp() const;
 
   public:
-    class Impl;                        ///< Implementation
+    struct Impl;                       ///< Implementation
   private:
     RWCOW_pointer<Impl> _pimpl;        ///< Pointer to implementation
   };
index 17afa2b..c896f3f 100644 (file)
@@ -18,7 +18,6 @@
 #include "zypp/Vendor.h"
 
 #include "zypp/sat/LookupAttr.h"
-#include "zypp/sat/SolvableSet.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
index 94136ba..75550d8 100644 (file)
@@ -39,7 +39,7 @@ namespace zypp
 
   public:
     /** Implementation  */
-    class Impl;
+    struct Impl;
 
     typedef MapKVIteratorTraits<SelectablePool>::Value_const_iterator const_iterator;
     typedef SelectablePool::size_type size_type;
index a7e7dd3..89ebe40 100644 (file)
@@ -22,7 +22,7 @@ namespace zypp
 
   namespace resstatus
   {
-    class UserLockQueryManip;
+    struct UserLockQueryManip;
     class StatusBackup;
   }
 
@@ -322,7 +322,7 @@ namespace zypp
 
     /** \name Internal hard lock maintainance */
     //@{
-    friend class resstatus::UserLockQueryManip;
+    friend struct resstatus::UserLockQueryManip;
 
     bool isUserLockQueryMatch() const
     { return fieldValueIs<UserLockQueryField>( USERLOCK_MATCH ); }
index 33097a4..3a170c5 100644 (file)
@@ -89,6 +89,14 @@ namespace zypp
       static bool isPseudoInstalled()   { return traits::isPseudoInstalled( kind ); }
     };
 
+    // Defined in ResKind.cc
+    template<> const ResKind ResTraits<Package>::kind;
+    template<> const ResKind ResTraits<Patch>::kind;
+    template<> const ResKind ResTraits<Pattern>::kind;
+    template<> const ResKind ResTraits<Product>::kind;
+    template<> const ResKind ResTraits<SrcPackage>::kind;
+    template<> const ResKind ResTraits<Application>::kind;
+
   /** ResTraits specialisation for Resolvable.
    * Resolvable is common base and has no Kind value.
    */
index 548f780..f19ce62 100644 (file)
@@ -89,7 +89,7 @@ namespace zypp
     void addSolution( ProblemSolution_Ptr solution, bool inFront = false );
 
   private:
-    class Impl;
+    struct Impl;
     RWCOW_pointer<Impl> _pimpl;
   };
 
index e5b27cb..35f8a24 100644 (file)
@@ -208,7 +208,7 @@ namespace zypp
      */
     virtual std::ostream & dumpAsXmlOn( std::ostream & str, const std::string & content = "" ) const;
 
-    class Impl;
+    struct Impl;
 
   private:
       RWCOW_pointer<Impl> _pimpl;
index 2be2503..1416f95 100644 (file)
@@ -706,7 +706,7 @@ namespace zypp
        // _specMap[root] - scan root/zypp.conf and root/multiversion.d
 
        if ( root_r.empty() )
-         root_r == "/";
+         root_r = "/";
        bool cacheHit = _specMap.count( root_r );
        MultiversionSpec & ret( _specMap[root_r] );     // creates new entry on the fly
 
index 0fd500d..6712196 100644 (file)
@@ -190,7 +190,7 @@ namespace zypp
     bool isProcessRunning( pid_t pid_r )
     {
       // it is another program, not me, see if it is still running
-      Pathname procdir( "/proc"/str::numstring(pid_r) );
+      Pathname procdir( Pathname("/proc")/str::numstring(pid_r) );
       PathInfo status( procdir );
       MIL << "Checking " <<  status << endl;
 
@@ -371,7 +371,7 @@ namespace zypp
        {
          MIL << "Waiting whether pid " << globalLock().lockerPid() << " ends within $LOCK_TIMEOUT=" << LOCK_TIMEOUT << " sec." << endl;
          unsigned delay = 1;
-         Pathname procdir( "/proc"/str::numstring(globalLock().lockerPid()) );
+          Pathname procdir( Pathname("/proc")/str::numstring(globalLock().lockerPid()) );
          for ( long i = 0; i < LOCK_TIMEOUT; i += delay )
          {
            if ( PathInfo( procdir ).isDir() )  // wait for /proc/pid to disapear
@@ -384,7 +384,7 @@ namespace zypp
              {
                // another proc locked faster. maybe it ends fast as well....
                MIL << "Waiting whether pid " << globalLock().lockerPid() << " ends within " << (LOCK_TIMEOUT-i) << " sec." << endl;
-               procdir = Pathname( "/proc"/str::numstring(globalLock().lockerPid()) );
+                procdir = Pathname( Pathname("/proc")/str::numstring(globalLock().lockerPid()) );
              }
              else
              {
index e560043..9088901 100644 (file)
@@ -13,6 +13,7 @@
 #define ZYPP_BASE_EASY_H
 
 #include <cstdio>
+#include <type_traits>
 
 /** Convenient for-loops using iterator.
  * \code
   NON_MOVABLE(CLASS);                          \
   DEFAULT_COPYABLE(CLASS)
 
+
+/** Prevent an universal ctor to be chosen as copy ctor.
+ * \code
+ *  struct FeedStrings
+ *  {
+ *    template<typename TARG, typename X = disable_use_as_copy_ctor<FeedStrings,TARG>>
+ *    FeedStrings( TARG && arg_r )
+ *    : _value { std::forward<TARG>( arg_r ) }
+ *    {}
+ *
+ *    // Same with variadic template. Could be chosen as copy_ctor.
+ *    template<typename ... Us>
+ *    FeedStrings( Us &&... us )
+ *    : ...
+ *
+ *  private:
+ *    std::string _value;
+ * \endcode
+ */
+template<typename TBase, typename TDerived>
+using disable_use_as_copy_ctor = typename std::enable_if<!std::is_base_of<TBase,typename std::remove_reference<TDerived>::type>::value>::type;
+
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
index 0e4d090..42c4d80 100644 (file)
@@ -326,7 +326,7 @@ namespace zypp
     /** Helper for \ref ZYPP_THROW( Exception ). */
     template<class TExcpt, EnableIfIsException<TExcpt> = 0>
     void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
-    template<class TExcpt, EnableIfIsException<TExcpt> = 0>
+    template<class TExcpt, EnableIfIsException<TExcpt>>
     void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       excpt_r.relocate( where_r );
@@ -337,7 +337,7 @@ namespace zypp
     /** Helper for \ref ZYPP_THROW( not Exception ). */
     template<class TExcpt, EnableIfNotException<TExcpt> = 0>
     void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
-    template<class TExcpt, EnableIfNotException<TExcpt> = 0>
+    template<class TExcpt, EnableIfNotException<TExcpt>>
     void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       Exception::log( typeid(excpt_r).name(), where_r, "THROW:   " );
@@ -363,7 +363,7 @@ namespace zypp
     /** Helper for \ref ZYPP_THROW( Exception ). */
     template<class TExcpt, EnableIfIsException<TExcpt> = 0>
     void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
-    template<class TExcpt, EnableIfIsException<TExcpt> = 0>
+    template<class TExcpt, EnableIfIsException<TExcpt>>
     void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       Exception::log( excpt_r, where_r, "RETHROW: " );
@@ -374,7 +374,7 @@ namespace zypp
     /** Helper for \ref ZYPP_THROW( not Exception ). */
     template<class TExcpt, EnableIfNotException<TExcpt> = 0>
     void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
-    template<class TExcpt, EnableIfNotException<TExcpt> = 0>
+    template<class TExcpt, EnableIfNotException<TExcpt>>
     void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       Exception::log( excpt_r, where_r, "RETHROW: " );
index 8e28ca6..5a8c889 100644 (file)
@@ -303,7 +303,7 @@ namespace zypp
 
   public:
     /** Implementation  */
-    class Impl;
+    struct Impl;
 
   public:
     /** Default ctor matches nothing. */
diff --git a/zypp/base/Xml.cc b/zypp/base/Xml.cc
new file mode 100644 (file)
index 0000000..3b186c5
--- /dev/null
@@ -0,0 +1,20 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/base/Xml.cc
+ *
+*/
+#include "Xml.h"
+
+namespace zypp
+{
+  namespace xmlout
+  {
+    constexpr Node::OptionalContentType Node::optionalContent;
+  }
+}
index 19018df..1a57c64 100644 (file)
@@ -169,7 +169,7 @@ namespace zypp
     CredentialSize     credsUserSize()  const;
     bool               credsUserEmpty() const;
 
-    class Impl;
+    struct Impl;
   private:
     RW_pointer<Impl> _pimpl;
   };
index 03cee50..4320988 100644 (file)
@@ -43,32 +43,32 @@ namespace zypp {
 
       protected:
 
-       virtual void attachTo (bool next = false);
-        virtual void releaseFrom( const std::string & ejectDev );
+       virtual void attachTo (bool next = false) override;
+        virtual void releaseFrom( const std::string & ejectDev ) override;
        virtual void getFile(const Pathname & filename, const ByteCount &expectedFileSize_r ) const override;
-       virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
+       virtual void getDir( const Pathname & dirname, bool recurse_r ) const override;
         virtual void getDirInfo( std::list<std::string> & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
         virtual void getDirInfo( filesystem::DirContent & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
-        virtual bool getDoesFileExist( const Pathname & filename ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
+        virtual bool getDoesFileExist( const Pathname & filename ) const override;
 
-        virtual void forceEject(const std::string & ejectDev);
+        virtual void forceEject(const std::string & ejectDev) override;
 
-        virtual bool hasMoreDevices();
+        virtual bool hasMoreDevices() override;
 
         virtual void
         getDetectedDevices(std::vector<std::string> & devices,
-                           unsigned int & index) const;
+                           unsigned int & index) const override;
 
       public:
 
         MediaCD( const Url &      url_r,
                 const Pathname & attach_point_hint_r );
 
-        virtual ~MediaCD() { try { release(); } catch(...) {} }
+        virtual ~MediaCD() override { try { release(); } catch(...) {} }
 
-       virtual bool isAttached() const;
+       virtual bool isAttached() const override;
     };
 
 ///////////////////////////////////////////////////////////////////
index 29bb9c7..adce533 100644 (file)
@@ -33,23 +33,23 @@ namespace zypp {
 
     protected:
 
-      virtual void attachTo (bool next = false);
-      virtual void releaseFrom( const std::string & ejectDev );
+      virtual void attachTo (bool next = false) override;
+      virtual void releaseFrom( const std::string & ejectDev ) override;
       virtual void getFile( const Pathname & filename, const ByteCount &expectedFileSize_r ) const override;
-      virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
+      virtual void getDir( const Pathname & dirname, bool recurse_r ) const override;
       virtual void getDirInfo( std::list<std::string> & retlist,
-                               const Pathname & dirname, bool dots = true ) const;
+                               const Pathname & dirname, bool dots = true ) const override;
       virtual void getDirInfo( filesystem::DirContent & retlist,
-                               const Pathname & dirname, bool dots = true ) const;
-      virtual bool getDoesFileExist( const Pathname & filename ) const;
+                               const Pathname & dirname, bool dots = true ) const override;
+      virtual bool getDoesFileExist( const Pathname & filename ) const override;
 
     public:
       MediaCIFS( const Url&       url_r,
                const Pathname & attach_point_hint_r );
 
-      virtual ~MediaCIFS() { try { release(); } catch(...) {} }
+      virtual ~MediaCIFS() override { try { release(); } catch(...) {} }
 
-      virtual bool isAttached() const;
+      virtual bool isAttached() const override;
 
     private:
       bool authenticate( AuthData & authdata, bool firstTry ) const;
index af4c5f7..20f0f5a 100644 (file)
@@ -1807,6 +1807,9 @@ bool MediaCurl::authenticate(const string & availAuthTypes, bool firstTry) const
   return false;
 }
 
+//need a out of line definiton, otherwise vtable is emitted for every translation unit
+MediaCurl::Callbacks::~Callbacks() {}
+
 
   } // namespace media
 } // namespace zypp
index 0d5adaa..fe9c369 100644 (file)
@@ -51,20 +51,20 @@ class MediaCurl : public MediaHandler
 
     Url clearQueryString(const Url &url) const;
 
-    virtual void attachTo (bool next = false);
-    virtual void releaseFrom( const std::string & ejectDev );
+    virtual void attachTo (bool next = false) override;
+    virtual void releaseFrom( const std::string & ejectDev ) override;
     virtual void getFile( const Pathname & filename, const ByteCount &expectedFileSize_r ) const override;
-    virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
+    virtual void getDir( const Pathname & dirname, bool recurse_r ) const override;
     virtual void getDirInfo( std::list<std::string> & retlist,
-                             const Pathname & dirname, bool dots = true ) const;
+                             const Pathname & dirname, bool dots = true ) const override;
     virtual void getDirInfo( filesystem::DirContent & retlist,
-                             const Pathname & dirname, bool dots = true ) const;
+                             const Pathname & dirname, bool dots = true ) const override;
     /**
      * Repeatedly calls doGetDoesFileExist() until it successfully returns,
      * fails unexpectedly, or user cancels the operation. This is used to
      * handle authentication or similar retry scenarios on media level.
      */
-    virtual bool getDoesFileExist( const Pathname & filename ) const;
+    virtual bool getDoesFileExist( const Pathname & filename ) const override;
 
     /**
      * \see MediaHandler::getDoesFileExist
@@ -76,7 +76,7 @@ class MediaCurl : public MediaHandler
      * \throws MediaException
      *
      */
-    virtual void disconnectFrom();
+    virtual void disconnectFrom() override;
     /**
      *
      * \throws MediaException
@@ -92,14 +92,14 @@ class MediaCurl : public MediaHandler
     virtual void doGetFileCopy( const Pathname & srcFilename, const Pathname & targetFilename, callback::SendReport<DownloadProgressReport> & _report, const ByteCount &expectedFileSize_r,  RequestOptions options = OPTION_NONE ) const;
 
 
-    virtual bool checkAttachPoint(const Pathname &apoint) const;
+    virtual bool checkAttachPoint(const Pathname &apoint) const override;
 
   public:
 
     MediaCurl( const Url &      url_r,
               const Pathname & attach_point_hint_r );
 
-    virtual ~MediaCurl() { try { release(); } catch(...) {} }
+    virtual ~MediaCurl() override { try { release(); } catch(...) {} }
 
     TransferSettings & settings();
 
@@ -108,7 +108,7 @@ class MediaCurl : public MediaHandler
     class Callbacks
     {
       public:
-       virtual ~Callbacks() {}
+       virtual ~Callbacks();
         virtual bool progress( int percent ) = 0;
     };
 
index 988c5bf..fb2309f 100644 (file)
@@ -29,22 +29,22 @@ namespace zypp {
 
       protected:
 
-       virtual void attachTo (bool next = false);
-        virtual void releaseFrom( const std::string & ejectDev );
+       virtual void attachTo (bool next = false) override;
+        virtual void releaseFrom( const std::string & ejectDev ) override;
        virtual void getFile( const Pathname & filename, const ByteCount &expectedFileSize_r ) const override;
-       virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
+       virtual void getDir( const Pathname & dirname, bool recurse_r ) const override;
         virtual void getDirInfo( std::list<std::string> & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
         virtual void getDirInfo( filesystem::DirContent & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
-        virtual bool getDoesFileExist( const Pathname & filename ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
+        virtual bool getDoesFileExist( const Pathname & filename ) const override;
 
       public:
 
         MediaDIR( const Url &      url_r,
                  const Pathname & attach_point_hint_r );
 
-        virtual ~MediaDIR() { try { release(); } catch(...) {} }
+        virtual ~MediaDIR() override { try { release(); } catch(...) {} }
     };
 
     ///////////////////////////////////////////////////////////////////
index 8b2dc9e..ffd74a3 100644 (file)
@@ -27,32 +27,29 @@ namespace zypp {
     class MediaDISK : public MediaHandler {
 
       private:
-
-        unsigned long _mountflags;
-
         std::string _device;
         std::string _filesystem;
 
       protected:
 
-       virtual void attachTo (bool next = false);
-        virtual void releaseFrom( const std::string & ejectDev );
+       virtual void attachTo (bool next = false) override;
+        virtual void releaseFrom( const std::string & ejectDev ) override;
        virtual void getFile(const Pathname & filename, const ByteCount &expectedFileSize_r ) const override;
-       virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
+       virtual void getDir( const Pathname & dirname, bool recurse_r ) const override;
         virtual void getDirInfo( std::list<std::string> & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
         virtual void getDirInfo( filesystem::DirContent & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
-        virtual bool getDoesFileExist( const Pathname & filename ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
+        virtual bool getDoesFileExist( const Pathname & filename ) const override;
 
       public:
 
         MediaDISK( const Url &      url_r,
                   const Pathname & attach_point_hint_r );
 
-        virtual ~MediaDISK() { try { release(); } catch(...) {} }
+        virtual ~MediaDISK() override { try { release(); } catch(...) {} }
 
-        virtual bool isAttached() const;
+        virtual bool isAttached() const override;
 
         bool    verifyIfDiskVolume(const Pathname &name);
     };
index 81c8ad4..82b6def 100644 (file)
@@ -26,6 +26,8 @@ namespace zypp
   namespace media {
   /////////////////////////////////////////////////////////////////
 
+    MediaException::~MediaException () noexcept {}
+
     std::ostream & MediaMountException::dumpOn( std::ostream & str ) const
     {
       str << form(_("Failed to mount %s on %s"), _source.c_str(), _target.c_str() );
@@ -214,7 +216,7 @@ namespace zypp
       return str;
     }
 
-  /////////////////////////////////////////////////////////////////
+    /////////////////////////////////////////////////////////////////
   } // namespace media
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 1ffea3f..18e6689 100644 (file)
@@ -48,7 +48,7 @@ namespace zypp
       {}
 
       /** Dtor. */
-      virtual ~MediaException() throw() {};
+      virtual ~MediaException() noexcept override;
     };
 
     class MediaMountException : public MediaException
@@ -72,7 +72,7 @@ namespace zypp
       , _cmdout(cmdout_r)
       {}
       /** Dtor. */
-      virtual ~MediaMountException() throw() {};
+      virtual ~MediaMountException() noexcept {}
 
       const std::string & mountError() const
       { return _error;  }
@@ -105,7 +105,7 @@ namespace zypp
       , _path(path_r)
       {}
       /** Dtor. */
-      virtual ~MediaUnmountException() throw() {};
+      virtual ~MediaUnmountException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -120,7 +120,7 @@ namespace zypp
       : MediaException()
       , _filename(filename_r)
       {}
-      virtual ~MediaBadFilenameException() throw() {};
+      virtual ~MediaBadFilenameException() noexcept {}
       std::string filename() const { return _filename; }
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
@@ -135,7 +135,7 @@ namespace zypp
       : MediaException()
       , _action(action_r)
       {}
-      virtual ~MediaNotOpenException() throw() {};
+      virtual ~MediaNotOpenException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -151,7 +151,7 @@ namespace zypp
       , _url(url_r.asString())
       , _filename(filename_r.asString())
       {}
-      virtual ~MediaFileNotFoundException() throw() {};
+      virtual ~MediaFileNotFoundException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -166,7 +166,7 @@ namespace zypp
       : MediaException()
       , _filename(filename_r.asString())
       {}
-      virtual ~MediaWriteException() throw() {};
+      virtual ~MediaWriteException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -180,7 +180,7 @@ namespace zypp
       : MediaException()
       , _url(url_r.asString())
       {}
-      virtual ~MediaNotAttachedException() throw() {};
+      virtual ~MediaNotAttachedException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -194,7 +194,7 @@ namespace zypp
       : MediaException()
       , _url(url_r.asString())
       {}
-      virtual ~MediaBadAttachPointException() throw() {};
+      virtual ~MediaBadAttachPointException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -208,7 +208,7 @@ namespace zypp
       : MediaException()
       , _url(url_r.asString())
       {}
-      virtual ~MediaCurlInitException() throw() {};
+      virtual ~MediaCurlInitException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -224,7 +224,7 @@ namespace zypp
       , _url(url_r.asString())
       , _message(message_r)
       {}
-      virtual ~MediaSystemException() throw() {};
+      virtual ~MediaSystemException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -241,7 +241,7 @@ namespace zypp
       , _url(url_r.asString())
       , _path(path_r.asString())
       {}
-      virtual ~MediaNotAFileException() throw() {};
+      virtual ~MediaNotAFileException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -258,7 +258,7 @@ namespace zypp
       , _url(url_r.asString())
       , _path(path_r.asString())
       {}
-      virtual ~MediaNotADirException() throw() {};
+      virtual ~MediaNotADirException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -275,7 +275,7 @@ namespace zypp
       , _url(url_r.asString())
       , _msg(msg_r)
       {}
-      virtual ~MediaBadUrlException() throw() {};
+      virtual ~MediaBadUrlException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
       std::string _url;
@@ -288,7 +288,7 @@ namespace zypp
       MediaBadUrlEmptyHostException(const Url & url_r)
       : MediaBadUrlException(url_r)
       {}
-      virtual ~MediaBadUrlEmptyHostException() throw() {};
+      virtual ~MediaBadUrlEmptyHostException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     };
@@ -299,7 +299,7 @@ namespace zypp
       MediaBadUrlEmptyFilesystemException(const Url & url_r)
       : MediaBadUrlException(url_r)
       {}
-      virtual ~MediaBadUrlEmptyFilesystemException() throw() {};
+      virtual ~MediaBadUrlEmptyFilesystemException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     };
@@ -310,7 +310,7 @@ namespace zypp
       MediaBadUrlEmptyDestinationException(const Url & url_r)
       : MediaBadUrlException(url_r)
       {}
-      virtual ~MediaBadUrlEmptyDestinationException() throw() {};
+      virtual ~MediaBadUrlEmptyDestinationException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     };
@@ -321,7 +321,7 @@ namespace zypp
       MediaUnsupportedUrlSchemeException(const Url & url_r)
       : MediaBadUrlException(url_r)
       {}
-      virtual ~MediaUnsupportedUrlSchemeException() throw() {};
+      virtual ~MediaUnsupportedUrlSchemeException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     };
@@ -333,7 +333,7 @@ namespace zypp
       : MediaException()
       , _url(url_r.asString())
       {}
-      virtual ~MediaNotSupportedException() throw() {};
+      virtual ~MediaNotSupportedException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
       std::string _url;
@@ -350,7 +350,7 @@ namespace zypp
       , _err(err_r)
       , _msg(msg_r)
       {}
-      virtual ~MediaCurlException() throw() {};
+      virtual ~MediaCurlException() noexcept {}
       std::string errstr() const { return _err; }
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
@@ -367,7 +367,7 @@ namespace zypp
       , _url(url_r.asString())
       , _msg(msg_r)
       {}
-      virtual ~MediaCurlSetOptException() throw() {};
+      virtual ~MediaCurlSetOptException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
       std::string _url;
@@ -381,7 +381,7 @@ namespace zypp
       : MediaException()
       , _url(url_r.asString())
       {}
-      virtual ~MediaNotDesiredException() throw() {};
+      virtual ~MediaNotDesiredException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -398,7 +398,7 @@ namespace zypp
       : MediaException()
       , _name(name)
       {}
-      virtual ~MediaIsSharedException() throw() {};
+      virtual ~MediaIsSharedException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -417,7 +417,7 @@ namespace zypp
       : MediaException("Can't eject media")
       , _name(name)
       {}
-      virtual ~MediaNotEjectedException() throw() {};
+      virtual ~MediaNotEjectedException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
     private:
@@ -444,7 +444,7 @@ namespace zypp
       , _hint(hint_r)
       {}
 
-      virtual ~MediaUnauthorizedException() throw() {};
+      virtual ~MediaUnauthorizedException() noexcept {}
 
       const Url         & url()  const { return _url;  }
       const std::string & err()  const { return _err;  }
@@ -466,7 +466,7 @@ namespace zypp
       : MediaException(msg)
       , _url(url_r.asString()), _msg(msg)
       {}
-      virtual ~MediaForbiddenException() throw() {};
+      virtual ~MediaForbiddenException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
       std::string _url;
@@ -480,7 +480,7 @@ namespace zypp
       : MediaException(msg)
       , _url(url_r.asString()), _msg(msg)
       {}
-      virtual ~MediaTimeoutException() throw() {};
+      virtual ~MediaTimeoutException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
       std::string _url;
@@ -496,7 +496,7 @@ namespace zypp
       , _msg(msg)
       , _expectedFileSize(cnt_r)
       {}
-      virtual ~MediaFileSizeExceededException() throw() {};
+      virtual ~MediaFileSizeExceededException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
       std::string _url;
@@ -512,7 +512,7 @@ namespace zypp
       : MediaException(msg)
       , _url(url_r.asString()), _msg(msg)
       {}
-      virtual ~MediaTemporaryProblemException() throw() {};
+      virtual ~MediaTemporaryProblemException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
       std::string _url;
@@ -526,7 +526,7 @@ namespace zypp
       : MediaException(msg)
       , _url(url_r.asString()), _msg(msg)
       {}
-      virtual ~MediaBadCAException() throw() {};
+      virtual ~MediaBadCAException() noexcept {}
     protected:
       virtual std::ostream & dumpOn( std::ostream & str ) const;
       std::string _url;
index 032a3b4..ece2408 100644 (file)
@@ -36,20 +36,19 @@ namespace zypp
     {
       private:
         Pathname      _isofile;
-        MediaAccessId _isosource;
         std::string   _filesystem;
 
       protected:
 
-       virtual void attachTo (bool next = false);
-        virtual void releaseFrom( const std::string & ejectDev = "" );
-       virtual void getFile( const Pathname & filename, const ByteCount &expectedFileSize_r ) const;
-       virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
+       virtual void attachTo (bool next = false) override;
+        virtual void releaseFrom( const std::string & ejectDev = "" ) override;
+       virtual void getFile( const Pathname & filename, const ByteCount &expectedFileSize_r ) const override;
+       virtual void getDir( const Pathname & dirname, bool recurse_r ) const override;
         virtual void getDirInfo( std::list<std::string> & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
         virtual void getDirInfo( filesystem::DirContent & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
-        virtual bool getDoesFileExist( const Pathname & filename ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
+        virtual bool getDoesFileExist( const Pathname & filename ) const override;
 
       public:
 
@@ -57,10 +56,10 @@ namespace zypp
                  const Pathname &attach_point_hint_r);
 
         virtual
-        ~MediaISO();
+        ~MediaISO() override;
 
         virtual bool
-        isAttached() const;
+        isAttached() const override;
     };
 
 
index faed227..f2fb3da 100644 (file)
@@ -42,7 +42,7 @@ namespace zypp
 
     ///////////////////////////////////////////////////////////////////
     // forward declaration
-    class MountEntry;
+    struct MountEntry;
     class MediaManager_Impl;
 
     ///////////////////////////////////////////////////////////////////
index 0c2e1ee..6b62c9d 100644 (file)
@@ -43,7 +43,7 @@ public:
   friend class multifetchworker;
 
   MediaMultiCurl(const Url &url_r, const Pathname & attach_point_hint_r);
-  ~MediaMultiCurl();
+  ~MediaMultiCurl() override;
 
   virtual void doGetFileCopy( const Pathname & srcFilename, const Pathname & targetFilename, callback::SendReport<DownloadProgressReport> & _report, const ByteCount &expectedFileSize_r, RequestOptions options = OPTION_NONE ) const override;
 
@@ -57,7 +57,7 @@ protected:
   CURL *fromEasyPool(const std::string &host) const;
   void toEasyPool(const std::string &host, CURL *easy) const;
 
-  virtual void setupEasy();
+  virtual void setupEasy() override;
   void checkFileDigest(Url &url, FILE *fp, MediaBlockList *blklist) const;
   static int progressCallback( void *clientp, double dltotal, double dlnow, double ultotal, double ulnow );
 
index bcc084c..a67b221 100644 (file)
@@ -37,25 +37,25 @@ namespace zypp {
 
       protected:
 
-       virtual void attachTo (bool next = false);
+       virtual void attachTo (bool next = false) override;
 
-        virtual void releaseFrom( const std::string & ejectDev );
-       virtual void getFile( const Pathname & filename, const ByteCount &expectedFileSize_r ) const;
-       virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
+        virtual void releaseFrom( const std::string & ejectDev ) override;
+       virtual void getFile( const Pathname & filename, const ByteCount &expectedFileSize_r ) const override;
+       virtual void getDir( const Pathname & dirname, bool recurse_r ) const override;
         virtual void getDirInfo( std::list<std::string> & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
         virtual void getDirInfo( filesystem::DirContent & retlist,
-                                 const Pathname & dirname, bool dots = true ) const;
-        virtual bool getDoesFileExist( const Pathname & filename ) const;
+                                 const Pathname & dirname, bool dots = true ) const override;
+        virtual bool getDoesFileExist( const Pathname & filename ) const override;
 
       public:
 
         MediaNFS( const Url&       url_r,
                  const Pathname & attach_point_hint_r );
 
-        virtual ~MediaNFS() { try { release(); } catch(...) {} }
+        virtual ~MediaNFS() override { try { release(); } catch(...) {} }
 
-       virtual bool isAttached() const;
+       virtual bool isAttached() const override;
     };
 
     ///////////////////////////////////////////////////////////////////
index c48ceb8..53b36d8 100644 (file)
@@ -31,16 +31,16 @@ namespace zypp
       public:
        MediaPlugin( const Url & url_r, const Pathname & attach_point_hint_r );
 
-        virtual ~MediaPlugin() { try { release(); } catch(...) {} }
+        virtual ~MediaPlugin() override { try { release(); } catch(...) {} }
 
       protected:
-       virtual void attachTo( bool next_r = false );
-       virtual void releaseFrom( const std::string & ejectDev_r );
-       virtual void getFile( const Pathname & filename_r, const ByteCount &expectedFileSize_r ) const;
-       virtual void getDir( const Pathname & dirname_r, bool recurse_r ) const;
-       virtual void getDirInfo( std::list<std::string> & retlist_r, const Pathname & dirname_r, bool dots_r = true ) const;
-       virtual void getDirInfo( filesystem::DirContent & retlist_r, const Pathname & dirname_r, bool dots_r = true ) const;
-       virtual bool getDoesFileExist( const Pathname & filename_r ) const;
+       virtual void attachTo( bool next_r = false ) override;
+       virtual void releaseFrom( const std::string & ejectDev_r ) override;
+       virtual void getFile( const Pathname & filename_r, const ByteCount &expectedFileSize_r ) const override;
+       virtual void getDir( const Pathname & dirname_r, bool recurse_r ) const override;
+       virtual void getDirInfo( std::list<std::string> & retlist_r, const Pathname & dirname_r, bool dots_r = true ) const override;
+       virtual void getDirInfo( filesystem::DirContent & retlist_r, const Pathname & dirname_r, bool dots_r = true ) const override;
+       virtual bool getDoesFileExist( const Pathname & filename_r ) const override;
     };
 
     //////////////////////////////////////////////////////////////////
index b1f5bad..213fb49 100644 (file)
@@ -36,7 +36,7 @@ namespace zypp
 
     public:
 
-      class Impl;
+      struct Impl;
 
       typedef std::multimap<std::string, std::string> HeaderList;
 
index b23f037..407834a 100644 (file)
@@ -141,7 +141,7 @@ namespace zypp
 
   private:
     /** Implementation */
-    class Impl;
+    struct Impl;
     RW_pointer<Impl,rw_pointer::Scoped<Impl> > _pimpl;
   };
 
index 15b57c9..e43ba56 100644 (file)
@@ -40,7 +40,7 @@ namespace zypp
     class ProductFileData
     {
       public:
-        class Impl;
+        struct Impl;
         /** Ctor takes ownership of \c allocated_r. */
         ProductFileData( Impl * allocated_r = 0 );
 
@@ -72,7 +72,7 @@ namespace zypp
         struct Upgrade
         {
           public:
-            class Impl;
+            struct Impl;
             /** Ctor takes ownership of \c allocated_r. */
             Upgrade( Impl * allocated_r = 0 );
 
index 1e403e2..6a53222 100644 (file)
@@ -43,8 +43,7 @@ namespace zypp
       struct ContentFileReader::Impl
       {
        public:
-         Impl( const ContentFileReader & parent_r )
-         : _parent( parent_r )
+         Impl()
          {}
 
          RepoIndex & repoindex()
@@ -85,7 +84,6 @@ namespace zypp
          std::string _inputname;
 
        private:
-         const ContentFileReader & _parent;
          RepoIndex_Ptr      _repoindex;
       };
       ///////////////////////////////////////////////////////////////////
@@ -119,7 +117,7 @@ namespace zypp
       //
       void ContentFileReader::beginParse()
       {
-       _pimpl.reset( new Impl(*this) );
+       _pimpl.reset( new Impl() );
         // actually mandatory, but in case they were forgotten...
         _pimpl->repoindex().descrdir = "suse/setup/descr";
         _pimpl->repoindex().datadir = "suse";
index addf838..2a0694a 100644 (file)
@@ -85,7 +85,7 @@ namespace zypp
                                 const std::string & line_r = "-" ) const;
 
        private:
-         class Impl;
+         struct Impl;
          RW_pointer<Impl,rw_pointer::Scoped<Impl> > _pimpl;
          RepoIndexConsumer _repoIndexConsumer;
       };
index 44b5261..a85b37e 100644 (file)
@@ -25,7 +25,7 @@ namespace zypp
   { /////////////////////////////////////////////////////////////////
 
     class Reader;
-    class ParseDefConsume;
+    struct ParseDefConsume;
 
     ///////////////////////////////////////////////////////////////////
     //
index e59cd12..47e523a 100644 (file)
@@ -39,7 +39,7 @@ namespace zypp
 
     public:
       /** Implementation  */
-      class Impl;
+      struct Impl;
 
     public:
       DeltaCandidates();
index 984692b..1604b52 100644 (file)
@@ -94,7 +94,7 @@ namespace zypp
       bool isCached() const;
 
     public:
-      class Impl;              ///< Implementation class.
+      struct Impl;              ///< Implementation class.
     private:
       RW_pointer<Impl> _pimpl; ///< Pointer to implementation.
     };
index e31ff59..378d765 100644 (file)
@@ -157,7 +157,7 @@ namespace zypp
        */
       virtual std::ostream & dumpAsXmlOn( std::ostream & str, const std::string & content = "" ) const;
 
-      class Impl;
+      struct Impl;
     private:
       /** Pointer to implementation */
       RWCOW_pointer<Impl> _pimpl;
index ea209ab..a4d23d7 100644 (file)
@@ -42,7 +42,7 @@ namespace zypp
       ~ServiceRepos();
 
     public:
-      class Impl;      //!< Expose type only
+      struct Impl;     //!< Expose type only
     private:
       RW_pointer<Impl> _impl;
     };
index f547e22..726cddd 100644 (file)
@@ -26,7 +26,7 @@ namespace zypp
 
   class CheckSum;
   class Match;
-  class MatchException;
+  struct MatchException;
   class StrMatcher;
 
   ///////////////////////////////////////////////////////////////////
index b44a1f6..f7914e9 100644 (file)
@@ -38,6 +38,8 @@ namespace zypp
   namespace sat
   { /////////////////////////////////////////////////////////////////
 
+  constexpr Map::PoolSizeType Map::poolSize;
+
     Map::Map()
       : _pimpl( new detail::CMap )
     { ::map_init( _pimpl.get(), 0 ); }
index 4419222..232959c 100644 (file)
 #include "zypp/base/Hash.h"
 
 #include "zypp/sat/Solvable.h"
+#include "zypp/PoolItem.h"
+#include "zypp/ui/Selectable.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
-  class PoolItem;
-  class asPoolItem; // transform functor
-
-  namespace ui
-  {
-    class asSelectable; // transform functor
-  }
-
   ///////////////////////////////////////////////////////////////////
   namespace sat
   { /////////////////////////////////////////////////////////////////
 
     class Solvable;
-    class asSolvable; // transform functor
+    //class asSolvable; // transform functor
 
     namespace solvitermixin_detail
     {
index 2f01f90..cb45d94 100644 (file)
@@ -36,6 +36,8 @@ namespace zypp
   namespace sat
   { /////////////////////////////////////////////////////////////////
 
+    constexpr Transaction::LoadFromPoolType Transaction::loadFromPool;
+
     /** Transaction implementation.
      *
      * \NOTE After commit the @System repo is reloaded. This invalidates
index a2165f9..60406a4 100644 (file)
@@ -181,7 +181,7 @@ namespace zypp
 
       public:
         /** Implementation  */
-        class Impl;
+        struct Impl;
       private:
         /** Pointer to implementation */
         RW_pointer<Impl> _pimpl;
index c57f572..cea6abe 100644 (file)
@@ -124,7 +124,7 @@ namespace zypp
         const_iterator end() const;
 
       private:
-        struct Impl;
+        class Impl;
         RW_pointer<Impl> _pimpl;
     };
     ///////////////////////////////////////////////////////////////////
index 52ab226..79c5fc0 100644 (file)
@@ -45,7 +45,7 @@ namespace zypp
   namespace detail
   {
     class RepoIterator;
-    class ByRepository;
+    struct ByRepository;
   }
 
   ///////////////////////////////////////////////////////////////////
index f8287a2..72ea4d7 100644 (file)
@@ -38,7 +38,7 @@ namespace zypp
       class Resolver;
       typedef Resolver ResolverInternal;       ///< Preferred name in API
 
-      class ItemCapKind;
+      struct ItemCapKind;
       typedef std::list<ItemCapKind> ItemCapKindList;
 
       DEFINE_PTR_TYPE(SolverQueueItem);
index eb446af..7298b33 100644 (file)
@@ -38,7 +38,7 @@ namespace zypp
 
       public:
         /** Implementation  */
-        class Impl;
+        struct Impl;
 
       public:
        typedef std::vector<std::string> ModaliasList;
index e13e564..64a2224 100644 (file)
@@ -528,7 +528,7 @@ namespace zypp
 
     public:
       /** Implementation  */
-      class Impl;
+      struct Impl;
       typedef shared_ptr<Impl> Impl_Ptr;
       /** Default ctor */
       Selectable( Impl_Ptr pimpl_r );
index 56dd17e..0ee62c0 100644 (file)
@@ -65,7 +65,7 @@ namespace zypp
     // METHOD TYPE : Constructor
     //
     ZYppImpl::ZYppImpl()
-    : _target(0)
+    : _target( nullptr )
     , _resolver( new Resolver( ResPool::instance()) )
     {
       ZConfig::instance().about( MIL );
@@ -138,7 +138,7 @@ namespace zypp
       if (_target)
           _target->unload();
 
-      _target = 0;
+      _target = nullptr;
     }
 
     //------------------------------------------------------------------------
@@ -227,7 +227,7 @@ namespace zypp
 
   Pathname myTmpDir()  // from TmpPath.h
   {
-    static filesystem::TmpDir _tmpdir( TmpPath::defaultLocation(), "zypp." );
+    static filesystem::TmpDir _tmpdir( filesystem::TmpPath::defaultLocation(), "zypp." );
     return _tmpdir.path();
   }
 
index fc70cfa..4a32758 100644 (file)
@@ -23,8 +23,6 @@
 #include "zypp/DiskUsageCounter.h"
 #include "zypp/ManagedFile.h"
 
-using namespace zypp::filesystem;
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////