diff options
Diffstat (limited to 'paludis')
-rw-r--r-- | paludis/resolver/destination_utils-fwd.hh | 1 | ||||
-rw-r--r-- | paludis/resolver/destination_utils.cc | 8 | ||||
-rw-r--r-- | paludis/resolver/make_origin_filtered_generator_helper.cc | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/paludis/resolver/destination_utils-fwd.hh b/paludis/resolver/destination_utils-fwd.hh index 250083aee..3770f51d8 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 7097e8784..1c16d63aa 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 a397f87c7..adddb3e90 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; |