1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/RepoManager.cc
17 #include "zypp/base/InputStream.h"
18 #include "zypp/base/Logger.h"
19 #include "zypp/base/Gettext.h"
20 #include "zypp/base/Function.h"
21 #include "zypp/PathInfo.h"
22 #include "zypp/TmpPath.h"
24 #include "zypp/repo/RepoException.h"
25 #include "zypp/RepoManager.h"
27 #include "zypp/cache/CacheStore.h"
28 #include "zypp/repo/cached/RepoImpl.h"
29 #include "zypp/media/MediaManager.h"
30 #include "zypp/MediaSetAccess.h"
32 #include "zypp/parser/RepoFileReader.h"
33 #include "zypp/repo/yum/Downloader.h"
34 #include "zypp/parser/yum/RepoParser.h"
35 #include "zypp/parser/plaindir/RepoParser.h"
36 #include "zypp/repo/susetags/Downloader.h"
37 #include "zypp/parser/susetags/RepoParser.h"
39 #include "zypp/ZYppCallbacks.h"
43 using namespace zypp::repo;
44 using namespace zypp::filesystem;
46 using namespace zypp::repo;
48 ///////////////////////////////////////////////////////////////////
50 { /////////////////////////////////////////////////////////////////
52 ///////////////////////////////////////////////////////////////////
54 // CLASS NAME : RepoManagerOptions
56 ///////////////////////////////////////////////////////////////////
58 RepoManagerOptions::RepoManagerOptions()
61 repoCachePath = globalConfig.defaultRepoCachePath();
62 repoRawCachePath = globalConfig.defaultRepoRawCachePath();
63 knownReposPath = globalConfig.defaultKnownReposPath();
66 ////////////////////////////////////////////////////////////////////////////
69 * \short Simple callback to collect the results
71 * Classes like RepoFileParser call the callback
72 * once per each repo in a file.
74 * Passing this functor as callback, you can collect
75 * all resuls at the end, without dealing with async
90 bool collect( const RepoInfo &repo )
92 //MIL << "here in collector: " << repo.alias() << endl;
93 repos.push_back(repo);
94 //MIL << "added: " << repo.alias() << endl;
101 ////////////////////////////////////////////////////////////////////////////
104 * Reads RepoInfo's from a repo file.
106 * \param file pathname of the file to read.
108 static std::list<RepoInfo> repositories_in_file( const Pathname & file )
110 MIL << "repo file: " << file << endl;
111 RepoCollector collector;
112 parser::RepoFileReader parser( file, bind( &RepoCollector::collect, &collector, _1 ) );
113 return collector.repos;
116 ////////////////////////////////////////////////////////////////////////////
118 std::list<RepoInfo> readRepoFile(const Url & repo_file)
120 // no interface to download a specific file, using workaround:
121 //! \todo add MediaManager::provideFile(Url file_url) to easily access any file URLs? (no need for media access id or media_nr)
123 Pathname path(url.getPathName());
124 url.setPathName ("/");
125 MediaSetAccess access(url);
126 Pathname local = access.provideFile(path);
128 DBG << "reading repo file " << repo_file << ", local path: " << local << endl;
130 return repositories_in_file(local);
133 ////////////////////////////////////////////////////////////////////////////
136 * \short List of RepoInfo's from a directory
138 * Goes trough every file in a directory and adds all
139 * RepoInfo's contained in that file.
141 * \param dir pathname of the directory to read.
143 static std::list<RepoInfo> repositories_in_dir( const Pathname &dir )
145 MIL << "directory " << dir << endl;
146 list<RepoInfo> repos;
147 list<Pathname> entries;
148 if ( filesystem::readdir( entries, Pathname(dir), false ) != 0 )
149 ZYPP_THROW(Exception("failed to read directory"));
151 for ( list<Pathname>::const_iterator it = entries.begin(); it != entries.end(); ++it )
153 list<RepoInfo> tmp = repositories_in_file( *it );
154 repos.insert( repos.end(), tmp.begin(), tmp.end() );
156 //std::copy( collector.repos.begin(), collector.repos.end(), std::back_inserter(repos));
157 //MIL << "ok" << endl;
162 ////////////////////////////////////////////////////////////////////////////
164 static void assert_alias( const RepoInfo &info )
166 if (info.alias().empty())
167 ZYPP_THROW(RepoNoAliasException());
170 ////////////////////////////////////////////////////////////////////////////
172 static void assert_urls( const RepoInfo &info )
174 if (info.baseUrls().empty())
175 ZYPP_THROW(RepoNoUrlException());
178 ////////////////////////////////////////////////////////////////////////////
181 * \short Calculates the raw cache path for a repository
183 static Pathname rawcache_path_for_repoinfo( const RepoManagerOptions &opt, const RepoInfo &info )
186 return opt.repoRawCachePath + info.alias();
189 ///////////////////////////////////////////////////////////////////
191 // CLASS NAME : RepoManager::Impl
193 ///////////////////////////////////////////////////////////////////
196 * \short RepoManager implementation.
198 struct RepoManager::Impl
200 Impl( const RepoManagerOptions &opt )
211 RepoManagerOptions options;
214 /** Offer default Impl. */
215 static shared_ptr<Impl> nullimpl()
217 static shared_ptr<Impl> _nullimpl( new Impl );
222 friend Impl * rwcowClone<Impl>( const Impl * rhs );
223 /** clone for RWCOW_pointer */
225 { return new Impl( *this ); }
227 ///////////////////////////////////////////////////////////////////
229 /** \relates RepoManager::Impl Stream output */
230 inline std::ostream & operator<<( std::ostream & str, const RepoManager::Impl & obj )
232 return str << "RepoManager::Impl";
235 ///////////////////////////////////////////////////////////////////
237 // CLASS NAME : RepoManager
239 ///////////////////////////////////////////////////////////////////
241 RepoManager::RepoManager( const RepoManagerOptions &opt )
242 : _pimpl( new Impl(opt) )
245 ////////////////////////////////////////////////////////////////////////////
247 RepoManager::~RepoManager()
250 ////////////////////////////////////////////////////////////////////////////
252 std::list<RepoInfo> RepoManager::knownRepositories() const
256 if ( PathInfo(_pimpl->options.knownReposPath).isExist() )
257 return repositories_in_dir(_pimpl->options.knownReposPath);
259 return std::list<RepoInfo>();
264 ////////////////////////////////////////////////////////////////////////////
266 RepoStatus RepoManager::rawMetadataStatus( const RepoInfo &info )
268 Pathname rawpath = rawcache_path_for_repoinfo( _pimpl->options, info );
269 RepoType repokind = info.type();
272 switch ( repokind.toEnum() )
274 case RepoType::NONE_e:
275 // unknown, probe the local metadata
276 repokind = probe(rawpath.asUrl());
282 switch ( repokind.toEnum() )
284 case RepoType::RPMMD_e :
286 status = RepoStatus( rawpath + "/repodata/repomd.xml");
290 case RepoType::YAST2_e :
292 status = RepoStatus( rawpath + "/content");
296 case RepoType::RPMPLAINDIR_e :
298 if ( PathInfo(Pathname(rawpath + "/cookie")).isExist() )
299 status = RepoStatus( rawpath + "/cookie");
303 case RepoType::NONE_e :
304 // Return default RepoStatus in case of RepoType::NONE
305 // indicating it should be created?
306 // ZYPP_THROW(RepoUnknownTypeException());
313 void RepoManager::refreshMetadata( const RepoInfo &info,
314 RawMetadataRefreshPolicy policy,
315 const ProgressData::ReceiverFnc & progress )
320 RepoStatus oldstatus;
321 RepoStatus newstatus;
322 // try urls one by one
323 for ( RepoInfo::urls_const_iterator it = info.baseUrlsBegin(); it != info.baseUrlsEnd(); ++it )
328 filesystem::TmpDir tmpdir;
330 repo::RepoType repokind = info.type();
332 // if the type is unknown, try probing.
333 switch ( repokind.toEnum() )
335 case RepoType::NONE_e:
337 repokind = probe(*it);
343 Pathname rawpath = rawcache_path_for_repoinfo( _pimpl->options, info );
344 oldstatus = rawMetadataStatus(info);
346 switch ( repokind.toEnum() )
348 case RepoType::RPMMD_e :
350 yum::Downloader downloader( url, "/" );
352 RepoStatus newstatus = downloader.status();
353 bool refresh = false;
354 if ( oldstatus.checksum() == newstatus.checksum() )
356 MIL << "repo has not changed" << endl;
357 if ( policy == RefreshForced )
359 MIL << "refresh set to forced" << endl;
369 downloader.download(tmpdir.path());
375 case RepoType::YAST2_e :
377 susetags::Downloader downloader( url, "/" );
379 RepoStatus newstatus = downloader.status();
380 bool refresh = false;
381 if ( oldstatus.checksum() == newstatus.checksum() )
383 MIL << "repo has not changed" << endl;
384 if ( policy == RefreshForced )
386 MIL << "refresh set to forced" << endl;
396 downloader.download(tmpdir.path());
403 case RepoType::RPMPLAINDIR_e :
405 RepoStatus newstatus = parser::plaindir::dirStatus(url.getPathName());
406 bool refresh = false;
407 if ( oldstatus.checksum() == newstatus.checksum() )
409 MIL << "repo has not changed" << endl;
410 if ( policy == RefreshForced )
412 MIL << "refresh set to forced" << endl;
423 std::ofstream file(( tmpdir.path() + "/cookie").c_str());
425 ZYPP_THROW (Exception( "Can't open " + tmpdir.path().asString() + "/cookie" ) );
428 file << newstatus.checksum() << endl;
438 ZYPP_THROW(RepoUnknownTypeException());
441 // ok we have the metadata, now exchange
444 filesystem::assert_dir(rawpath);
445 filesystem::rename( rawpath, oldmetadata.path() );
446 // move the just downloaded there
447 filesystem::rename( tmpdir.path(), rawpath );
451 catch ( const Exception &e )
454 ERR << "Trying another url..." << endl;
457 ERR << "No more urls..." << endl;
458 ZYPP_THROW(RepoException("Cant refresh metadata"));
461 ////////////////////////////////////////////////////////////////////////////
463 void RepoManager::cleanMetadata( const RepoInfo &info,
464 const ProgressData::ReceiverFnc & progress )
466 filesystem::recursive_rmdir(rawcache_path_for_repoinfo(_pimpl->options, info));
469 void RepoManager::buildCache( const RepoInfo &info,
470 CacheBuildPolicy policy,
471 const ProgressData::ReceiverFnc & progressrcv )
473 ProgressData progress(100);
474 callback::SendReport<ProgressReport> report;
475 progress.sendTo( ProgressReportAdaptor( progressrcv, report ) );
476 progress.name(str::form(_("Building repository '%s' cache"), info.alias().c_str()));
480 Pathname rawpath = rawcache_path_for_repoinfo(_pimpl->options, info);
482 cache::CacheStore store(_pimpl->options.repoCachePath);
484 RepoStatus raw_metadata_status = rawMetadataStatus(info);
485 if ( raw_metadata_status.empty() )
487 ZYPP_THROW(RepoMetadataException(info));
490 if ( store.isCached( info.alias() ) )
492 MIL << info.alias() << " is already cached." << endl;
493 data::RecordId id = store.lookupRepository(info.alias());
494 RepoStatus cache_status = store.repositoryStatus(id);
496 if ( cache_status.checksum() == raw_metadata_status.checksum() )
498 MIL << info.alias() << " cache is up to date with metadata." << endl;
499 if ( policy == BuildIfNeeded ) {
504 MIL << info.alias() << " cache rebuild is forced" << endl;
507 MIL << info.alias() << " cleaning cache..." << endl;
508 store.cleanRepository(id);
511 MIL << info.alias() << " building cache..." << endl;
512 data::RecordId id = store.lookupOrAppendRepository(info.alias());
514 repo::RepoType repokind = info.type();
516 // if the type is unknown, try probing.
517 switch ( repokind.toEnum() )
519 case RepoType::NONE_e:
520 // unknown, probe the local metadata
521 repokind = probe(rawpath.asUrl());
527 CombinedProgressData subprogrcv( progress, 100);
529 switch ( repokind.toEnum() )
531 case RepoType::RPMMD_e :
533 parser::yum::RepoParser parser(id, store, parser::yum::RepoParserOpts(), subprogrcv);
534 parser.parse(rawpath);
538 case RepoType::YAST2_e :
540 parser::susetags::RepoParser parser(id, store, subprogrcv);
541 parser.parse(rawpath);
545 case RepoType::RPMPLAINDIR_e :
547 InputStream is(rawpath + "cookie");
549 getline( is.stream(), buffer);
551 parser::plaindir::RepoParser parser(id, store, subprogrcv);
552 parser.parse(url.getPathName());
556 ZYPP_THROW(RepoUnknownTypeException());
559 // update timestamp and checksum
560 store.updateRepositoryStatus(id, raw_metadata_status);
562 MIL << "Commit cache.." << endl;
567 ////////////////////////////////////////////////////////////////////////////
569 repo::RepoType RepoManager::probe( const Url &url )
571 if ( url.getScheme() == "dir" && ! PathInfo( url.getPathName() ).isDir() )
573 // Handle non existing local directory in advance, as
574 // MediaSetAccess does not support it.
575 return repo::RepoType::NONE;
578 MediaSetAccess access(url);
579 if ( access.doesFileExist("/repodata/repomd.xml") )
580 return repo::RepoType::RPMMD;
581 if ( access.doesFileExist("/content") )
582 return repo::RepoType::YAST2;
584 // if it is a local url of type dir
585 if ( (! media::MediaManager::downloads(url)) && ( url.getScheme() == "dir" ) )
587 Pathname path = Pathname(url.getPathName());
588 if ( PathInfo(path).isDir() )
590 // allow empty dirs for now
591 return repo::RepoType::RPMPLAINDIR;
595 return repo::RepoType::NONE;
598 ////////////////////////////////////////////////////////////////////////////
600 void RepoManager::cleanCache( const RepoInfo &info,
601 const ProgressData::ReceiverFnc & progressrcv )
603 ProgressData progress(100);
604 callback::SendReport<ProgressReport> report;
605 progress.sendTo( ProgressReportAdaptor( progressrcv, report ) );
606 progress.name(str::form(_("Cleaning repository '%s' cache"), info.alias().c_str()));
609 cache::CacheStore store(_pimpl->options.repoCachePath);
611 data::RecordId id = store.lookupRepository(info.alias());
612 store.cleanRepository(id);
616 ////////////////////////////////////////////////////////////////////////////
618 bool RepoManager::isCached( const RepoInfo &info ) const
620 cache::CacheStore store(_pimpl->options.repoCachePath);
621 return store.isCached(info.alias());
624 Repository RepoManager::createFromCache( const RepoInfo &info,
625 const ProgressData::ReceiverFnc & progressrcv )
627 callback::SendReport<ProgressReport> report;
628 ProgressData progress;
629 progress.sendTo(ProgressReportAdaptor( progressrcv, report ));
630 progress.sendTo( progressrcv );
631 progress.name(str::form(_("Reading repository '%s' cache"), info.alias().c_str()));
634 cache::CacheStore store(_pimpl->options.repoCachePath);
636 if ( ! store.isCached( info.alias() ) )
637 ZYPP_THROW(RepoNotCachedException());
639 MIL << "Repository " << info.alias() << " is cached" << endl;
641 data::RecordId id = store.lookupRepository(info.alias());
643 repo::cached::RepoOptions opts( info, _pimpl->options.repoCachePath, id );
644 opts.readingResolvablesProgress = progressrcv;
645 repo::cached::RepoImpl::Ptr repoimpl =
646 new repo::cached::RepoImpl( opts );
648 repoimpl->resolvables();
649 // read the resolvables from cache
650 return Repository(repoimpl);
653 ////////////////////////////////////////////////////////////////////////////
656 * Generate a non existing filename in a directory, using a base
657 * name. For example if a directory contains 3 files
663 * If you try to generate a unique filename for this directory,
664 * based on "ruu" you will get "ruu", but if you use the base
665 * "foo" you will get "foo_1"
667 * \param dir Directory where the file needs to be unique
668 * \param basefilename string to base the filename on.
670 static Pathname generate_non_existing_name( const Pathname &dir,
671 const std::string &basefilename )
673 string final_filename = basefilename;
675 while ( PathInfo(dir + final_filename).isExist() )
677 final_filename = basefilename + "_" + str::numstring(counter);
680 return dir + Pathname(final_filename);
683 ////////////////////////////////////////////////////////////////////////////
686 * \short Generate a related filename from a repo info
688 * From a repo info, it will try to use the alias as a filename
689 * escaping it if necessary. Other fallbacks can be added to
690 * this function in case there is no way to use the alias
692 static std::string generate_filename( const RepoInfo &info )
696 std::string filename = info.alias();
697 // replace slashes with underscores
698 size_t pos = filename.find(fnd);
699 while(pos!=string::npos)
701 filename.replace(pos,fnd.length(),rep);
702 pos = filename.find(fnd,pos+rep.length());
704 filename = Pathname(filename).extend(".repo").asString();
705 MIL << "generating filename for repo [" << info.alias() << "] : '" << filename << "'" << endl;
710 ////////////////////////////////////////////////////////////////////////////
712 void RepoManager::addRepository( const RepoInfo &info,
713 const ProgressData::ReceiverFnc & progressrcv )
717 ProgressData progress(100);
718 callback::SendReport<ProgressReport> report;
719 progress.sendTo( ProgressReportAdaptor( progressrcv, report ) );
720 progress.name(str::form(_("Adding repository '%s'"), info.alias().c_str()));
723 std::list<RepoInfo> repos = knownRepositories();
724 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
728 if ( info.alias() == (*it).alias() )
729 ZYPP_THROW(RepoAlreadyExistsException(info.alias()));
734 // assert the directory exists
735 filesystem::assert_dir(_pimpl->options.knownReposPath);
737 Pathname repofile = generate_non_existing_name(_pimpl->options.knownReposPath,
738 generate_filename(info));
739 // now we have a filename that does not exists
740 MIL << "Saving repo in " << repofile << endl;
742 std::ofstream file(repofile.c_str());
744 ZYPP_THROW (Exception( "Can't open " + repofile.asString() ) );
747 info.dumpRepoOn(file);
749 MIL << "done" << endl;
752 void RepoManager::addRepositories( const Url &url,
753 const ProgressData::ReceiverFnc & progressrcv )
755 std::list<RepoInfo> knownrepos = knownRepositories();
756 std::list<RepoInfo> repos = readRepoFile(url);
757 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
761 // look if the alias is in the known repos.
762 for ( std::list<RepoInfo>::const_iterator kit = knownrepos.begin();
763 kit != knownrepos.end();
766 if ( (*it).alias() == (*kit).alias() )
768 ERR << "To be added repo " << (*it).alias() << " conflicts with existing repo " << (*kit).alias() << endl;
769 ZYPP_THROW(RepoAlreadyExistsException((*it).alias()));
774 string filename = Pathname(url.getPathName()).basename();
776 if ( filename == Pathname() )
777 ZYPP_THROW(RepoException("Invalid repo file name at " + url.asString() ));
779 // assert the directory exists
780 filesystem::assert_dir(_pimpl->options.knownReposPath);
782 Pathname repofile = generate_non_existing_name(_pimpl->options.knownReposPath, filename);
783 // now we have a filename that does not exists
784 MIL << "Saving " << repos.size() << " repo" << ( repos.size() ? "s" : "" ) << " in " << repofile << endl;
786 std::ofstream file(repofile.c_str());
788 ZYPP_THROW (Exception( "Can't open " + repofile.asString() ) );
791 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
795 MIL << "Saving " << (*it).alias() << endl;
796 (*it).dumpRepoOn(file);
798 MIL << "done" << endl;
801 ////////////////////////////////////////////////////////////////////////////
803 void RepoManager::removeRepository( const RepoInfo & info,
804 const ProgressData::ReceiverFnc & progressrcv)
806 MIL << "Going to delete repo " << info.alias() << endl;
808 std::list<RepoInfo> repos = knownRepositories();
809 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
813 // they can be the same only if the provided is empty, that means
814 // the provided repo has no alias
816 if ( (!info.alias().empty()) && ( info.alias() != (*it).alias() ) )
821 // we have a matcing repository, now we need to know
822 // where it does come from.
823 RepoInfo todelete = *it;
824 if (todelete.filepath().empty())
826 ZYPP_THROW(RepoException("Can't figure where the repo is stored"));
830 // figure how many repos are there in the file:
831 std::list<RepoInfo> filerepos = repositories_in_file(todelete.filepath());
832 if ( (filerepos.size() == 1) && ( filerepos.front().alias() == todelete.alias() ) )
834 // easy, only this one, just delete the file
835 if ( filesystem::unlink(todelete.filepath()) != 0 )
837 ZYPP_THROW(RepoException("Can't delete " + todelete.filepath().asString()));
839 MIL << todelete.alias() << " sucessfully deleted." << endl;
844 // there are more repos in the same file
845 // write them back except the deleted one.
847 //std::ofstream file(tmp.path().c_str());
849 // assert the directory exists
850 filesystem::assert_dir(todelete.filepath().dirname());
852 std::ofstream file(todelete.filepath().c_str());
854 //ZYPP_THROW (Exception( "Can't open " + tmp.path().asString() ) );
855 ZYPP_THROW (Exception( "Can't open " + todelete.filepath().asString() ) );
857 for ( std::list<RepoInfo>::const_iterator fit = filerepos.begin();
858 fit != filerepos.end();
861 if ( (*fit).alias() != todelete.alias() )
862 (*fit).dumpRepoOn(file);
865 cache::CacheStore store(_pimpl->options.repoCachePath);
867 if ( store.isCached( todelete.alias() ) ) {
868 MIL << "repository was cached. cleaning cache" << endl;
869 store.cleanRepository(todelete.alias());
872 MIL << todelete.alias() << " sucessfully deleted." << endl;
875 } // else filepath is empty
878 // should not be reached on a sucess workflow
879 ZYPP_THROW(RepoNotFoundException(info));
882 ////////////////////////////////////////////////////////////////////////////
884 void RepoManager::modifyRepository( const std::string &alias,
885 const RepoInfo & newinfo,
886 const ProgressData::ReceiverFnc & progressrcv )
888 RepoInfo toedit = getRepositoryInfo(alias);
890 if (toedit.filepath().empty())
892 ZYPP_THROW(RepoException("Can't figure where the repo is stored"));
896 // figure how many repos are there in the file:
897 std::list<RepoInfo> filerepos = repositories_in_file(toedit.filepath());
899 // there are more repos in the same file
900 // write them back except the deleted one.
902 //std::ofstream file(tmp.path().c_str());
904 // assert the directory exists
905 filesystem::assert_dir(toedit.filepath().dirname());
907 std::ofstream file(toedit.filepath().c_str());
909 //ZYPP_THROW (Exception( "Can't open " + tmp.path().asString() ) );
910 ZYPP_THROW (Exception( "Can't open " + toedit.filepath().asString() ) );
912 for ( std::list<RepoInfo>::const_iterator fit = filerepos.begin();
913 fit != filerepos.end();
916 // if the alias is different, dump the original
917 // if it is the same, dump the provided one
918 if ( (*fit).alias() != toedit.alias() )
919 (*fit).dumpRepoOn(file);
921 newinfo.dumpRepoOn(file);
926 ////////////////////////////////////////////////////////////////////////////
928 RepoInfo RepoManager::getRepositoryInfo( const std::string &alias,
929 const ProgressData::ReceiverFnc & progressrcv )
931 std::list<RepoInfo> repos = knownRepositories();
932 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
936 if ( (*it).alias() == alias )
940 info.setAlias(info.alias());
941 ZYPP_THROW(RepoNotFoundException(info));
944 ////////////////////////////////////////////////////////////////////////////
946 RepoInfo RepoManager::getRepositoryInfo( const Url & url,
947 const url::ViewOption & urlview,
948 const ProgressData::ReceiverFnc & progressrcv )
950 std::list<RepoInfo> repos = knownRepositories();
951 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
955 for(RepoInfo::urls_const_iterator urlit = (*it).baseUrlsBegin();
956 urlit != (*it).baseUrlsEnd();
959 if ((*urlit).asString(urlview) == url.asString(urlview))
964 info.setAlias(info.alias());
965 info.setBaseUrl(url);
966 ZYPP_THROW(RepoNotFoundException(info));
969 ////////////////////////////////////////////////////////////////////////////
971 std::ostream & operator<<( std::ostream & str, const RepoManager & obj )
973 return str << *obj._pimpl;
976 /////////////////////////////////////////////////////////////////
978 ///////////////////////////////////////////////////////////////////