Imported Upstream version 17.14.0
[platform/upstream/libzypp.git] / zypp / parser / susetags / ContentFileReader.cc
index d5f6497..6a53222 100644 (file)
@@ -43,8 +43,7 @@ namespace zypp
       struct ContentFileReader::Impl
       {
        public:
-         Impl( const ContentFileReader & parent_r )
-         : _parent( parent_r )
+         Impl()
          {}
 
          RepoIndex & repoindex()
@@ -55,13 +54,13 @@ namespace zypp
          }
 
          bool hasRepoIndex() const
-         { return _repoindex; }
+         { return _repoindex != nullptr; }
 
          RepoIndex_Ptr handoutRepoIndex()
          {
            RepoIndex_Ptr ret;
            ret.swap( _repoindex );
-           _repoindex = 0;
+           _repoindex = nullptr;
            return ret;
          }
 
@@ -85,7 +84,6 @@ namespace zypp
          std::string _inputname;
 
        private:
-         const ContentFileReader & _parent;
          RepoIndex_Ptr      _repoindex;
       };
       ///////////////////////////////////////////////////////////////////
@@ -119,7 +117,10 @@ 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";
       }
 
       ///////////////////////////////////////////////////////////////////