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 MediaSetAccess media(url);
351 yum::Downloader downloader(info.path());
353 RepoStatus newstatus = downloader.status(media);
354 bool refresh = false;
355 if ( oldstatus.checksum() == newstatus.checksum() )
357 MIL << "repo has not changed" << endl;
358 if ( policy == RefreshForced )
360 MIL << "refresh set to forced" << endl;
370 downloader.download( media, tmpdir.path());
376 case RepoType::YAST2_e :
378 MediaSetAccess media(url);
379 susetags::Downloader downloader(info.path());
381 RepoStatus newstatus = downloader.status(media);
382 bool refresh = false;
383 if ( oldstatus.checksum() == newstatus.checksum() )
385 MIL << "repo has not changed" << endl;
386 if ( policy == RefreshForced )
388 MIL << "refresh set to forced" << endl;
398 downloader.download(media, tmpdir.path());
405 case RepoType::RPMPLAINDIR_e :
407 RepoStatus newstatus = parser::plaindir::dirStatus(url.getPathName());
408 bool refresh = false;
409 if ( oldstatus.checksum() == newstatus.checksum() )
411 MIL << "repo has not changed" << endl;
412 if ( policy == RefreshForced )
414 MIL << "refresh set to forced" << endl;
425 std::ofstream file(( tmpdir.path() + "/cookie").c_str());
427 ZYPP_THROW (Exception( "Can't open " + tmpdir.path().asString() + "/cookie" ) );
430 file << newstatus.checksum() << endl;
440 ZYPP_THROW(RepoUnknownTypeException());
443 // ok we have the metadata, now exchange
446 filesystem::assert_dir(rawpath);
447 filesystem::rename( rawpath, oldmetadata.path() );
448 // move the just downloaded there
449 filesystem::rename( tmpdir.path(), rawpath );
453 catch ( const Exception &e )
456 ERR << "Trying another url..." << endl;
459 ERR << "No more urls..." << endl;
460 ZYPP_THROW(RepoException("Cant refresh metadata"));
463 ////////////////////////////////////////////////////////////////////////////
465 void RepoManager::cleanMetadata( const RepoInfo &info,
466 const ProgressData::ReceiverFnc & progress )
468 filesystem::recursive_rmdir(rawcache_path_for_repoinfo(_pimpl->options, info));
471 void RepoManager::buildCache( const RepoInfo &info,
472 CacheBuildPolicy policy,
473 const ProgressData::ReceiverFnc & progressrcv )
475 ProgressData progress(100);
476 callback::SendReport<ProgressReport> report;
477 progress.sendTo( ProgressReportAdaptor( progressrcv, report ) );
478 progress.name(str::form(_("Building repository '%s' cache"), info.alias().c_str()));
482 Pathname rawpath = rawcache_path_for_repoinfo(_pimpl->options, info);
484 cache::CacheStore store(_pimpl->options.repoCachePath);
486 RepoStatus raw_metadata_status = rawMetadataStatus(info);
487 if ( raw_metadata_status.empty() )
489 ZYPP_THROW(RepoMetadataException(info));
492 if ( store.isCached( info.alias() ) )
494 MIL << info.alias() << " is already cached." << endl;
495 data::RecordId id = store.lookupRepository(info.alias());
496 RepoStatus cache_status = store.repositoryStatus(id);
498 if ( cache_status.checksum() == raw_metadata_status.checksum() )
500 MIL << info.alias() << " cache is up to date with metadata." << endl;
501 if ( policy == BuildIfNeeded ) {
506 MIL << info.alias() << " cache rebuild is forced" << endl;
509 MIL << info.alias() << " cleaning cache..." << endl;
510 store.cleanRepository(id);
513 MIL << info.alias() << " building cache..." << endl;
514 data::RecordId id = store.lookupOrAppendRepository(info.alias());
516 repo::RepoType repokind = info.type();
518 // if the type is unknown, try probing.
519 switch ( repokind.toEnum() )
521 case RepoType::NONE_e:
522 // unknown, probe the local metadata
523 repokind = probe(rawpath.asUrl());
529 CombinedProgressData subprogrcv( progress, 100);
531 switch ( repokind.toEnum() )
533 case RepoType::RPMMD_e :
535 parser::yum::RepoParser parser(id, store, parser::yum::RepoParserOpts(), subprogrcv);
536 parser.parse(rawpath);
540 case RepoType::YAST2_e :
542 parser::susetags::RepoParser parser(id, store, subprogrcv);
543 parser.parse(rawpath);
547 case RepoType::RPMPLAINDIR_e :
549 InputStream is(rawpath + "cookie");
551 getline( is.stream(), buffer);
553 parser::plaindir::RepoParser parser(id, store, subprogrcv);
554 parser.parse(url.getPathName());
558 ZYPP_THROW(RepoUnknownTypeException());
561 // update timestamp and checksum
562 store.updateRepositoryStatus(id, raw_metadata_status);
564 MIL << "Commit cache.." << endl;
569 ////////////////////////////////////////////////////////////////////////////
571 repo::RepoType RepoManager::probe( const Url &url )
573 if ( url.getScheme() == "dir" && ! PathInfo( url.getPathName() ).isDir() )
575 // Handle non existing local directory in advance, as
576 // MediaSetAccess does not support it.
577 return repo::RepoType::NONE;
580 MediaSetAccess access(url);
581 if ( access.doesFileExist("/repodata/repomd.xml") )
582 return repo::RepoType::RPMMD;
583 if ( access.doesFileExist("/content") )
584 return repo::RepoType::YAST2;
586 // if it is a local url of type dir
587 if ( (! media::MediaManager::downloads(url)) && ( url.getScheme() == "dir" ) )
589 Pathname path = Pathname(url.getPathName());
590 if ( PathInfo(path).isDir() )
592 // allow empty dirs for now
593 return repo::RepoType::RPMPLAINDIR;
597 return repo::RepoType::NONE;
600 ////////////////////////////////////////////////////////////////////////////
602 void RepoManager::cleanCache( const RepoInfo &info,
603 const ProgressData::ReceiverFnc & progressrcv )
605 ProgressData progress(100);
606 callback::SendReport<ProgressReport> report;
607 progress.sendTo( ProgressReportAdaptor( progressrcv, report ) );
608 progress.name(str::form(_("Cleaning repository '%s' cache"), info.alias().c_str()));
611 cache::CacheStore store(_pimpl->options.repoCachePath);
613 data::RecordId id = store.lookupRepository(info.alias());
614 store.cleanRepository(id);
618 ////////////////////////////////////////////////////////////////////////////
620 bool RepoManager::isCached( const RepoInfo &info ) const
622 cache::CacheStore store(_pimpl->options.repoCachePath);
623 return store.isCached(info.alias());
626 Repository RepoManager::createFromCache( const RepoInfo &info,
627 const ProgressData::ReceiverFnc & progressrcv )
629 callback::SendReport<ProgressReport> report;
630 ProgressData progress;
631 progress.sendTo(ProgressReportAdaptor( progressrcv, report ));
632 progress.sendTo( progressrcv );
633 progress.name(str::form(_("Reading repository '%s' cache"), info.alias().c_str()));
636 cache::CacheStore store(_pimpl->options.repoCachePath);
638 if ( ! store.isCached( info.alias() ) )
639 ZYPP_THROW(RepoNotCachedException());
641 MIL << "Repository " << info.alias() << " is cached" << endl;
643 data::RecordId id = store.lookupRepository(info.alias());
645 repo::cached::RepoOptions opts( info, _pimpl->options.repoCachePath, id );
646 opts.readingResolvablesProgress = progressrcv;
647 repo::cached::RepoImpl::Ptr repoimpl =
648 new repo::cached::RepoImpl( opts );
650 repoimpl->resolvables();
651 // read the resolvables from cache
652 return Repository(repoimpl);
655 ////////////////////////////////////////////////////////////////////////////
658 * Generate a non existing filename in a directory, using a base
659 * name. For example if a directory contains 3 files
665 * If you try to generate a unique filename for this directory,
666 * based on "ruu" you will get "ruu", but if you use the base
667 * "foo" you will get "foo_1"
669 * \param dir Directory where the file needs to be unique
670 * \param basefilename string to base the filename on.
672 static Pathname generate_non_existing_name( const Pathname &dir,
673 const std::string &basefilename )
675 string final_filename = basefilename;
677 while ( PathInfo(dir + final_filename).isExist() )
679 final_filename = basefilename + "_" + str::numstring(counter);
682 return dir + Pathname(final_filename);
685 ////////////////////////////////////////////////////////////////////////////
688 * \short Generate a related filename from a repo info
690 * From a repo info, it will try to use the alias as a filename
691 * escaping it if necessary. Other fallbacks can be added to
692 * this function in case there is no way to use the alias
694 static std::string generate_filename( const RepoInfo &info )
698 std::string filename = info.alias();
699 // replace slashes with underscores
700 size_t pos = filename.find(fnd);
701 while(pos!=string::npos)
703 filename.replace(pos,fnd.length(),rep);
704 pos = filename.find(fnd,pos+rep.length());
706 filename = Pathname(filename).extend(".repo").asString();
707 MIL << "generating filename for repo [" << info.alias() << "] : '" << filename << "'" << endl;
712 ////////////////////////////////////////////////////////////////////////////
714 void RepoManager::addRepository( const RepoInfo &info,
715 const ProgressData::ReceiverFnc & progressrcv )
719 ProgressData progress(100);
720 callback::SendReport<ProgressReport> report;
721 progress.sendTo( ProgressReportAdaptor( progressrcv, report ) );
722 progress.name(str::form(_("Adding repository '%s'"), info.alias().c_str()));
725 std::list<RepoInfo> repos = knownRepositories();
726 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
730 if ( info.alias() == (*it).alias() )
731 ZYPP_THROW(RepoAlreadyExistsException(info.alias()));
736 // assert the directory exists
737 filesystem::assert_dir(_pimpl->options.knownReposPath);
739 Pathname repofile = generate_non_existing_name(_pimpl->options.knownReposPath,
740 generate_filename(info));
741 // now we have a filename that does not exists
742 MIL << "Saving repo in " << repofile << endl;
744 std::ofstream file(repofile.c_str());
746 ZYPP_THROW (Exception( "Can't open " + repofile.asString() ) );
749 info.dumpRepoOn(file);
751 MIL << "done" << endl;
754 void RepoManager::addRepositories( const Url &url,
755 const ProgressData::ReceiverFnc & progressrcv )
757 std::list<RepoInfo> knownrepos = knownRepositories();
758 std::list<RepoInfo> repos = readRepoFile(url);
759 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
763 // look if the alias is in the known repos.
764 for ( std::list<RepoInfo>::const_iterator kit = knownrepos.begin();
765 kit != knownrepos.end();
768 if ( (*it).alias() == (*kit).alias() )
770 ERR << "To be added repo " << (*it).alias() << " conflicts with existing repo " << (*kit).alias() << endl;
771 ZYPP_THROW(RepoAlreadyExistsException((*it).alias()));
776 string filename = Pathname(url.getPathName()).basename();
778 if ( filename == Pathname() )
779 ZYPP_THROW(RepoException("Invalid repo file name at " + url.asString() ));
781 // assert the directory exists
782 filesystem::assert_dir(_pimpl->options.knownReposPath);
784 Pathname repofile = generate_non_existing_name(_pimpl->options.knownReposPath, filename);
785 // now we have a filename that does not exists
786 MIL << "Saving " << repos.size() << " repo" << ( repos.size() ? "s" : "" ) << " in " << repofile << endl;
788 std::ofstream file(repofile.c_str());
790 ZYPP_THROW (Exception( "Can't open " + repofile.asString() ) );
793 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
797 MIL << "Saving " << (*it).alias() << endl;
798 (*it).dumpRepoOn(file);
800 MIL << "done" << endl;
803 ////////////////////////////////////////////////////////////////////////////
805 void RepoManager::removeRepository( const RepoInfo & info,
806 const ProgressData::ReceiverFnc & progressrcv)
808 MIL << "Going to delete repo " << info.alias() << endl;
810 std::list<RepoInfo> repos = knownRepositories();
811 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
815 // they can be the same only if the provided is empty, that means
816 // the provided repo has no alias
818 if ( (!info.alias().empty()) && ( info.alias() != (*it).alias() ) )
823 // we have a matcing repository, now we need to know
824 // where it does come from.
825 RepoInfo todelete = *it;
826 if (todelete.filepath().empty())
828 ZYPP_THROW(RepoException("Can't figure where the repo is stored"));
832 // figure how many repos are there in the file:
833 std::list<RepoInfo> filerepos = repositories_in_file(todelete.filepath());
834 if ( (filerepos.size() == 1) && ( filerepos.front().alias() == todelete.alias() ) )
836 // easy, only this one, just delete the file
837 if ( filesystem::unlink(todelete.filepath()) != 0 )
839 ZYPP_THROW(RepoException("Can't delete " + todelete.filepath().asString()));
841 MIL << todelete.alias() << " sucessfully deleted." << endl;
846 // there are more repos in the same file
847 // write them back except the deleted one.
849 //std::ofstream file(tmp.path().c_str());
851 // assert the directory exists
852 filesystem::assert_dir(todelete.filepath().dirname());
854 std::ofstream file(todelete.filepath().c_str());
856 //ZYPP_THROW (Exception( "Can't open " + tmp.path().asString() ) );
857 ZYPP_THROW (Exception( "Can't open " + todelete.filepath().asString() ) );
859 for ( std::list<RepoInfo>::const_iterator fit = filerepos.begin();
860 fit != filerepos.end();
863 if ( (*fit).alias() != todelete.alias() )
864 (*fit).dumpRepoOn(file);
867 cache::CacheStore store(_pimpl->options.repoCachePath);
869 if ( store.isCached( todelete.alias() ) ) {
870 MIL << "repository was cached. cleaning cache" << endl;
871 store.cleanRepository(todelete.alias());
874 MIL << todelete.alias() << " sucessfully deleted." << endl;
877 } // else filepath is empty
880 // should not be reached on a sucess workflow
881 ZYPP_THROW(RepoNotFoundException(info));
884 ////////////////////////////////////////////////////////////////////////////
886 void RepoManager::modifyRepository( const std::string &alias,
887 const RepoInfo & newinfo,
888 const ProgressData::ReceiverFnc & progressrcv )
890 RepoInfo toedit = getRepositoryInfo(alias);
892 if (toedit.filepath().empty())
894 ZYPP_THROW(RepoException("Can't figure where the repo is stored"));
898 // figure how many repos are there in the file:
899 std::list<RepoInfo> filerepos = repositories_in_file(toedit.filepath());
901 // there are more repos in the same file
902 // write them back except the deleted one.
904 //std::ofstream file(tmp.path().c_str());
906 // assert the directory exists
907 filesystem::assert_dir(toedit.filepath().dirname());
909 std::ofstream file(toedit.filepath().c_str());
911 //ZYPP_THROW (Exception( "Can't open " + tmp.path().asString() ) );
912 ZYPP_THROW (Exception( "Can't open " + toedit.filepath().asString() ) );
914 for ( std::list<RepoInfo>::const_iterator fit = filerepos.begin();
915 fit != filerepos.end();
918 // if the alias is different, dump the original
919 // if it is the same, dump the provided one
920 if ( (*fit).alias() != toedit.alias() )
921 (*fit).dumpRepoOn(file);
923 newinfo.dumpRepoOn(file);
928 ////////////////////////////////////////////////////////////////////////////
930 RepoInfo RepoManager::getRepositoryInfo( const std::string &alias,
931 const ProgressData::ReceiverFnc & progressrcv )
933 std::list<RepoInfo> repos = knownRepositories();
934 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
938 if ( (*it).alias() == alias )
942 info.setAlias(info.alias());
943 ZYPP_THROW(RepoNotFoundException(info));
946 ////////////////////////////////////////////////////////////////////////////
948 RepoInfo RepoManager::getRepositoryInfo( const Url & url,
949 const url::ViewOption & urlview,
950 const ProgressData::ReceiverFnc & progressrcv )
952 std::list<RepoInfo> repos = knownRepositories();
953 for ( std::list<RepoInfo>::const_iterator it = repos.begin();
957 for(RepoInfo::urls_const_iterator urlit = (*it).baseUrlsBegin();
958 urlit != (*it).baseUrlsEnd();
961 if ((*urlit).asString(urlview) == url.asString(urlview))
966 info.setAlias(info.alias());
967 info.setBaseUrl(url);
968 ZYPP_THROW(RepoNotFoundException(info));
971 ////////////////////////////////////////////////////////////////////////////
973 std::ostream & operator<<( std::ostream & str, const RepoManager & obj )
975 return str << *obj._pimpl;
978 /////////////////////////////////////////////////////////////////
980 ///////////////////////////////////////////////////////////////////