aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 17:00:27 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 17:00:27 +0000
commitc3e09c0cec51503b68e03a2910e16237f79356dc (patch)
treec6f391b5bed2f5af85a9aee266d463c451de9713
parentc914953343b2f2712e7817588c414fe7af794cab (diff)
downloadpaludis-c3e09c0cec51503b68e03a2910e16237f79356dc.tar.gz
paludis-c3e09c0cec51503b68e03a2910e16237f79356dc.tar.xz
Use binary rather than unbinaryable for filtering origins
Fixes: ticket:1051
-rw-r--r--paludis/resolver/destination_utils-fwd.hh1
-rw-r--r--paludis/resolver/destination_utils.cc8
-rw-r--r--paludis/resolver/make_origin_filtered_generator_helper.cc2
3 files changed, 10 insertions, 1 deletions
diff --git a/paludis/resolver/destination_utils-fwd.hh b/paludis/resolver/destination_utils-fwd.hh
index 250083a..3770f51 100644
--- a/paludis/resolver/destination_utils-fwd.hh
+++ b/paludis/resolver/destination_utils-fwd.hh
@@ -32,6 +32,7 @@ namespace paludis
namespace resolver
{
bool can_make_binary_for(const std::shared_ptr<const PackageID> & id) PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
+ bool is_already_binary(const std::shared_ptr<const PackageID> & id) PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
bool can_chroot(const std::shared_ptr<const PackageID> & id) PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
FilteredGenerator destination_filtered_generator(
diff --git a/paludis/resolver/destination_utils.cc b/paludis/resolver/destination_utils.cc
index 7097e87..1c16d63 100644
--- a/paludis/resolver/destination_utils.cc
+++ b/paludis/resolver/destination_utils.cc
@@ -39,6 +39,14 @@ paludis::resolver::can_make_binary_for(const std::shared_ptr<const PackageID> &
}
bool
+paludis::resolver::is_already_binary(const std::shared_ptr<const PackageID> & id)
+{
+ if (! id->behaviours_key())
+ return false;
+ return id->behaviours_key()->value()->end() != id->behaviours_key()->value()->find("binary");
+}
+
+bool
paludis::resolver::can_chroot(const std::shared_ptr<const PackageID> & id)
{
if (! id->behaviours_key())
diff --git a/paludis/resolver/make_origin_filtered_generator_helper.cc b/paludis/resolver/make_origin_filtered_generator_helper.cc
index a397f87..adddb3e 100644
--- a/paludis/resolver/make_origin_filtered_generator_helper.cc
+++ b/paludis/resolver/make_origin_filtered_generator_helper.cc
@@ -73,7 +73,7 @@ namespace
for (PackageIDSet::ConstIterator i(id->begin()), i_end(id->end()) ;
i != i_end ; ++i)
- if (can_make_binary_for(*i))
+ if (! is_already_binary(*i))
result->insert(*i);
return result;