pkgman RepositoryBuilder: Add BRepositoryConfig constructor

This commit is contained in:
Ingo Weinhold 2013-04-11 17:32:17 +02:00
parent fc57db481f
commit 789867563a
2 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,19 @@ RepositoryBuilder::RepositoryBuilder(BSolverRepository& repository,
}
RepositoryBuilder::RepositoryBuilder(BSolverRepository& repository,
const BRepositoryConfig& config)
:
fRepository(repository),
fErrorName(fRepository.Name()),
fPackagePaths(NULL)
{
status_t error = fRepository.SetTo(config);
if (error != B_OK)
DIE(error, "failed to init %s repository", fErrorName.String());
}
RepositoryBuilder&
RepositoryBuilder::SetPackagePathMap(PackagePathMap* packagePaths)
{

View File

@ -31,6 +31,8 @@ public:
RepositoryBuilder(BSolverRepository& repository,
const BString& name,
const BString& errorName = BString());
RepositoryBuilder(BSolverRepository& repository,
const BRepositoryConfig& config);
RepositoryBuilder& SetPackagePathMap(PackagePathMap* packagePaths);