pkgman RepositoryBuilder: Add BRepositoryConfig constructor
This commit is contained in:
parent
fc57db481f
commit
789867563a
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user