SourcePackage &main_pkg = dynamic_cast<SourcePackage &>(package_manager.get_main_package());
const Config &config = main_pkg.get_config();
const Config::OptionMap &options = config.get_options();
-
- IO::print("\nRequired packages:\n ");
const Package::Requirements &requires = main_pkg.get_required_packages();
- for(Package::Requirements::const_iterator i=requires.begin(); i!=requires.end(); ++i)
+
+ if(!requires.empty() || !options.empty())
+ IO::print("\nHelp for package %s:\n", main_pkg.get_name());
+
+ if(!requires.empty())
{
- if(i!=requires.begin())
- IO::print(", ");
- IO::print((*i)->get_name());
+ IO::print("\nRequired packages:\n ");
+ for(Package::Requirements::const_iterator i=requires.begin(); i!=requires.end(); ++i)
+ {
+ if(i!=requires.begin())
+ IO::print(", ");
+ IO::print((*i)->get_name());
+ }
+ IO::print("\n");
}
- IO::print("\n");
if(!options.empty())
{