BPackageManager: Add SetDebugLevel()
Sets the debug level of the solver.
This commit is contained in:
parent
74b582a4e5
commit
d228f29f6e
@ -75,6 +75,9 @@ public:
|
||||
|
||||
void Init(uint32 flags);
|
||||
|
||||
void SetDebugLevel(int32 level);
|
||||
// 0 - 10 (passed to libsolv)
|
||||
|
||||
BSolver* Solver() const
|
||||
{ return fSolver; }
|
||||
|
||||
@ -155,6 +158,7 @@ private:
|
||||
bool _NextSpecificInstallationLocation();
|
||||
|
||||
protected:
|
||||
int32 fDebugLevel;
|
||||
BPackageInstallationLocation fLocation;
|
||||
BSolver* fSolver;
|
||||
InstalledRepository* fSystemRepository;
|
||||
|
@ -51,6 +51,7 @@ BPackageManager::BPackageManager(BPackageInstallationLocation location,
|
||||
InstallationInterface* installationInterface,
|
||||
UserInteractionHandler* userInteractionHandler)
|
||||
:
|
||||
fDebugLevel(0),
|
||||
fLocation(location),
|
||||
fSolver(NULL),
|
||||
fSystemRepository(new (std::nothrow) InstalledRepository("system",
|
||||
@ -92,6 +93,8 @@ BPackageManager::Init(uint32 flags)
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
|
||||
fSolver->SetDebugLevel(fDebugLevel);
|
||||
|
||||
BRepositoryBuilder(*fLocalRepository).AddToSolver(fSolver, false);
|
||||
|
||||
// add installation location repositories
|
||||
@ -130,6 +133,16 @@ BPackageManager::Init(uint32 flags)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BPackageManager::SetDebugLevel(int32 level)
|
||||
{
|
||||
fDebugLevel = level;
|
||||
|
||||
if (fSolver != NULL)
|
||||
fSolver->SetDebugLevel(fDebugLevel);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BPackageManager::Install(const char* const* packages, int packageCount)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user