aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2006-11-29 14:57:59 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2006-11-29 14:57:59 +0000
commit0cee82d554de20f70b420d371b667b0f706c1c93 (patch)
tree960301a80299ac2b14506357bdb8bddf0e4c378a
parentac0c0d7ba51fd55dea7b5bd60f7ed74005dbecc5 (diff)
downloadpaludis-0cee82d554de20f70b420d371b667b0f706c1c93.tar.gz
paludis-0cee82d554de20f70b420d371b667b0f706c1c93.tar.xz
--report issues a warning instead of dying if built without GLSA support.
-rw-r--r--paludis/tasks/report_task.cc22
-rw-r--r--src/paludis/report.cc3
2 files changed, 19 insertions, 6 deletions
diff --git a/paludis/tasks/report_task.cc b/paludis/tasks/report_task.cc
index 57809ec..c593529 100644
--- a/paludis/tasks/report_task.cc
+++ b/paludis/tasks/report_task.cc
@@ -18,6 +18,7 @@
*/
#include "report_task.hh"
+#include <paludis/util/log.hh>
#include <paludis/environment.hh>
using namespace paludis;
@@ -134,6 +135,7 @@ ReportTask::execute()
on_report_all_pre();
paludis::Environment * const e(_imp->env);
+ bool once(true);
VulnerableChecker vuln(*e);
for (PackageDatabase::RepositoryIterator r(e->package_database()->begin_repositories()),
@@ -143,10 +145,22 @@ ReportTask::execute()
if (! rr->sets_interface)
continue;
- DepAtom::ConstPointer insecure(rr->sets_interface->package_set(SetName("insecurity")));
- if (! insecure)
- continue;
- insecure->accept(&vuln);
+ try
+ {
+ DepAtom::ConstPointer insecure(rr->sets_interface->package_set(SetName("insecurity")));
+ if (! insecure)
+ continue;
+ insecure->accept(&vuln);
+ }
+ catch (const NotAvailableError &)
+ {
+ if (once)
+ {
+ Log::get_instance()->message(ll_warning, lc_no_context,
+ "Skipping GLSA checks because Paludis was built without XML support");
+ once = false;
+ }
+ }
}
for (PackageDatabase::RepositoryIterator r(e->package_database()->begin_repositories()),
diff --git a/src/paludis/report.cc b/src/paludis/report.cc
index 7fb250b..773be79 100644
--- a/src/paludis/report.cc
+++ b/src/paludis/report.cc
@@ -146,8 +146,7 @@ namespace
void
OurReportTask::on_report_all_post()
{
- cout << endl <<
- "Finished processing " <<
+ cout << "Finished processing " <<
_n_packages << " " << (_n_packages != 1 ? "packages" : "package") << ". " <<
_n_errors << " " << (_n_errors != 1 ? "errors" : "error") << "." << endl;
}