Skip to content

Commit

Permalink
pkgman resolve-dependencies: Add --debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
weinhold committed Oct 26, 2014
1 parent f76e8e9 commit 1714eaf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/bin/pkgman/command_resolve_dependencies.cpp
Expand Up @@ -42,6 +42,11 @@ static const char* const kLongUsage =
"Resolves and lists all packages the given packages depend on. Fails, if\n"
"not all dependencies could be resolved.\n"
"\n"
"Options:\n"
" --debug <level>\n"
" Print debug output. <level> should be between 0 (no debug output,\n"
" the default) and 10 (most debug output).\n"
"\n"
"Arguments:\n"
" <package>\n"
" The HPKG or package info file of the package for which the\n"
Expand Down Expand Up @@ -114,6 +119,7 @@ ResolveDependenciesCommand::Execute(int argc, const char* const* argv)
{
while (true) {
static struct option sLongOptions[] = {
{ "debug", required_argument, 0, OPTION_DEBUG },
{ "help", no_argument, 0, 'h' },
{ 0, 0, 0, 0 }
};
Expand All @@ -123,6 +129,9 @@ ResolveDependenciesCommand::Execute(int argc, const char* const* argv)
if (c == -1)
break;

if (fCommonOptions.HandleOption(c))
continue;

switch (c) {
case 'h':
PrintUsageAndExit(false);
Expand Down Expand Up @@ -161,6 +170,8 @@ ResolveDependenciesCommand::Execute(int argc, const char* const* argv)
if (error != B_OK)
DIE(error, "failed to create solver");

solver->SetDebugLevel(fCommonOptions.DebugLevel());

// add repositories
BPackagePathMap packagePaths;
BObjectList<BSolverRepository> repositories(10, true);
Expand Down

0 comments on commit 1714eaf

Please sign in to comment.