aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-30 07:20:03 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-30 07:20:03 +0000
commitf86d8e54993e3501a140f0be1c60f5789a189a94 (patch)
tree1133dfe4ff6ca64c37e9bd13963c1f7c5a829dcd
parent3176f6a7fe50417fc0357d92eaeead39f2512aba (diff)
downloadpaludis-f86d8e54993e3501a140f0be1c60f5789a189a94.tar.gz
paludis-f86d8e54993e3501a140f0be1c60f5789a189a94.tar.xz
Don't check blocks unnecessarily
-rw-r--r--paludis/dep_list/dep_list.cc14
-rw-r--r--paludis/dep_list/options.cc4
-rw-r--r--paludis/dep_list/options.hh7
-rw-r--r--src/clients/adjutrix/display_default_system_resolution.cc1
-rw-r--r--src/clients/adjutrix/what_needs_keywording.cc2
5 files changed, 20 insertions, 8 deletions
diff --git a/paludis/dep_list/dep_list.cc b/paludis/dep_list/dep_list.cc
index c267d72..cdc4ab7 100644
--- a/paludis/dep_list/dep_list.cc
+++ b/paludis/dep_list/dep_list.cc
@@ -801,7 +801,8 @@ DepList::AddVisitor::visit(const AnyDepAtom * const a)
{
try
{
- Save<bool> save_t(&d->_imp->throw_on_blocker, true);
+ Save<bool> save_t(&d->_imp->throw_on_blocker,
+ dl_blocks_discard_completely != d->_imp->opts->blocks);
Save<DepListOverrideMasks> save_o(&d->_imp->opts->override_masks, DepListOverrideMasks());
d->add(*c);
return;
@@ -817,7 +818,8 @@ DepList::AddVisitor::visit(const AnyDepAtom * const a)
{
try
{
- Save<bool> save_t(&d->_imp->throw_on_blocker, true);
+ Save<bool> save_t(&d->_imp->throw_on_blocker,
+ dl_blocks_discard_completely != d->_imp->opts->blocks);
Save<DepListOverrideMasks> save_o(&d->_imp->opts->override_masks, DepListOverrideMasks());
d->add(*c);
return;
@@ -835,11 +837,12 @@ DepList::AddVisitor::visit(const AnyDepAtom * const a)
}
}
-#include <iostream>
-
void
DepList::AddVisitor::visit(const BlockDepAtom * const a)
{
+ if (dl_blocks_discard_completely == d->_imp->opts->blocks)
+ return;
+
Context context("When checking BlockDepAtom '!" + stringify(*a->blocked_atom()) + "':");
PackageDepAtom just_package(a->blocked_atom()->package());
@@ -918,6 +921,9 @@ DepList::AddVisitor::visit(const BlockDepAtom * const a)
+ stringify(*a->blocked_atom()) + "'");
break;
+ case dl_blocks_discard_completely:
+ break;
+
case dl_blocks_accumulate:
d->add_error_package(*aa, dlk_block);
break;
diff --git a/paludis/dep_list/options.cc b/paludis/dep_list/options.cc
index 9cfc46a..a7895a6 100644
--- a/paludis/dep_list/options.cc
+++ b/paludis/dep_list/options.cc
@@ -332,6 +332,10 @@ paludis::operator<< (std::ostream & o, const DepListBlocksOption & s)
o << "discard";
continue;
+ case dl_blocks_discard_completely:
+ o << "discard_completely";
+ continue;
+
case last_dl_blocks:
;
}
diff --git a/paludis/dep_list/options.hh b/paludis/dep_list/options.hh
index 2d2f1a7..a1f6e97 100644
--- a/paludis/dep_list/options.hh
+++ b/paludis/dep_list/options.hh
@@ -163,9 +163,10 @@ namespace paludis
*/
enum DepListBlocksOption
{
- dl_blocks_accumulate, ///< Accumulate them and show all errors together
- dl_blocks_error, ///< Error on the first one
- dl_blocks_discard, ///< Discard (dangerous)
+ dl_blocks_accumulate, ///< Accumulate them and show all errors together
+ dl_blocks_error, ///< Error on the first one
+ dl_blocks_discard, ///< Discard (dangerous)
+ dl_blocks_discard_completely, ///< Discard completely (not for user visible use)
last_dl_blocks
};
diff --git a/src/clients/adjutrix/display_default_system_resolution.cc b/src/clients/adjutrix/display_default_system_resolution.cc
index bde5bea..6db36f3 100644
--- a/src/clients/adjutrix/display_default_system_resolution.cc
+++ b/src/clients/adjutrix/display_default_system_resolution.cc
@@ -70,6 +70,7 @@ namespace
DepListOptions d_options;
d_options.circular = dl_circular_discard_silently;
+ d_options.blocks = dl_blocks_discard_completely;
DepList d(&env, d_options);
try
diff --git a/src/clients/adjutrix/what_needs_keywording.cc b/src/clients/adjutrix/what_needs_keywording.cc
index 0327b4c..0fe2d25 100644
--- a/src/clients/adjutrix/what_needs_keywording.cc
+++ b/src/clients/adjutrix/what_needs_keywording.cc
@@ -54,7 +54,7 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
DepListOptions d_options;
d_options.circular = dl_circular_discard_silently;
d_options.use = dl_use_deps_take_all;
- d_options.blocks = dl_blocks_discard;
+ d_options.blocks = dl_blocks_discard_completely;
d_options.override_masks.set(dl_override_tilde_keywords);
d_options.override_masks.set(dl_override_unkeyworded);
d_options.override_masks.set(dl_override_repository_masks);