BSolver: Add SetDebugLevel()
In LibsolvSolver set the debug level of the pool.
This commit is contained in:
@@ -46,6 +46,8 @@ public:
|
||||
|
||||
virtual status_t Init() = 0;
|
||||
|
||||
virtual void SetDebugLevel(int32 level) = 0;
|
||||
|
||||
virtual status_t AddRepository(
|
||||
BSolverRepository* repository) = 0;
|
||||
|
||||
|
||||
@@ -182,7 +182,8 @@ LibsolvSolver::LibsolvSolver()
|
||||
fInstalledRepository(NULL),
|
||||
fSolvablePackages(),
|
||||
fPackageSolvables(),
|
||||
fProblems(10, true)
|
||||
fProblems(10, true),
|
||||
fDebugLevel(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -203,6 +204,16 @@ LibsolvSolver::Init()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LibsolvSolver::SetDebugLevel(int32 level)
|
||||
{
|
||||
fDebugLevel = level;
|
||||
|
||||
if (fPool != NULL)
|
||||
pool_setdebuglevel(fPool, fDebugLevel);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
LibsolvSolver::AddRepository(BSolverRepository* repository)
|
||||
{
|
||||
@@ -585,6 +596,8 @@ LibsolvSolver::_InitPool()
|
||||
|
||||
fPool = pool_create();
|
||||
|
||||
pool_setdebuglevel(fPool, fDebugLevel);
|
||||
|
||||
// Set the system architecture. We use what uname() returns unless we're on
|
||||
// x86 gcc2.
|
||||
{
|
||||
|
||||
@@ -32,6 +32,8 @@ public:
|
||||
|
||||
virtual status_t Init();
|
||||
|
||||
virtual void SetDebugLevel(int32 level);
|
||||
|
||||
virtual status_t AddRepository(BSolverRepository* repository);
|
||||
|
||||
virtual status_t FindPackages(const char* searchString,
|
||||
@@ -133,6 +135,7 @@ private:
|
||||
SolvableMap fSolvablePackages;
|
||||
PackageMap fPackageSolvables;
|
||||
ProblemList fProblems;
|
||||
int32 fDebugLevel;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user