aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-31 17:35:52 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-31 17:35:52 +0100
commita24db92055cfadc1a77af3d7fb215960725ccf9f (patch)
tree35ac9460e8acc8095bf9c14f43be508159c71c9f
parent695d2a37fa986eae0ad560eee887c6d50b1d9bb6 (diff)
downloadpaludis-a24db92055cfadc1a77af3d7fb215960725ccf9f.tar.gz
paludis-a24db92055cfadc1a77af3d7fb215960725ccf9f.tar.xz
Don't try to make binaries for unbinaryable IDs
-rw-r--r--paludis/package_id.hh1
-rw-r--r--src/clients/cave/resolve_common.cc24
2 files changed, 21 insertions, 4 deletions
diff --git a/paludis/package_id.hh b/paludis/package_id.hh
index 4cd9584..c60aa99 100644
--- a/paludis/package_id.hh
+++ b/paludis/package_id.hh
@@ -321,6 +321,7 @@ namespace paludis
*
* - "transient", saying that an installed ID's origin is expected not to exist
* - "used", saying that an installed ID should not be treated as unused
+ * - "unbinaryable", saying that we should be excluded from requests to create a binary
*
* \since 0.48
*/
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 96dd5f1..9b1ff03 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -98,6 +98,13 @@ namespace
typedef std::map<Resolvent, std::shared_ptr<Constraints> > InitialConstraints;
typedef std::list<PackageDepSpec> PackageDepSpecList;
+ bool can_make_binary_for(const std::shared_ptr<const PackageID> & id)
+ {
+ if (! id->behaviours_key())
+ return true;
+ return id->behaviours_key()->value()->end() == id->behaviours_key()->value()->find("unbinaryable");
+ }
+
struct DestinationTypesFinder
{
const Environment * const env;
@@ -118,7 +125,12 @@ namespace
{
#ifdef ENABLE_PBINS
if (resolution_options.a_make.argument() == "binaries")
- return DestinationTypes() + dt_create_binary;
+ {
+ if (package_id && can_make_binary_for(package_id))
+ return DestinationTypes() + dt_create_binary;
+ else
+ return DestinationTypes();
+ }
else if (resolution_options.a_make.argument() == "install")
return DestinationTypes() + dt_install_to_slash;
else
@@ -151,16 +163,20 @@ namespace
#ifdef ENABLE_PBINS
if (resolution_options.a_make.argument() == "binaries")
{
+ bool binary_if_possible(false);
if (resolution_options.a_make_dependencies.argument() == "auto" ||
resolution_options.a_make_dependencies.argument() == "all")
- extras += dt_create_binary;
+ binary_if_possible = true;
else if (resolution_options.a_make_dependencies.argument() == "runtime")
{
/* this will track run deps of build deps, which isn't
* really right... */
if (is_run_or_post_dep(dep.sanitised_dependency()))
- extras += dt_create_binary;
+ binary_if_possible = true;
}
+
+ if (binary_if_possible && package_id && can_make_binary_for(package_id))
+ extras += dt_create_binary;
}
#endif
@@ -1349,7 +1365,7 @@ namespace
if (! changes_decision)
return false;
- return match_any(env, list, changes_decision->origin_id());
+ return can_make_binary_for(changes_decision->origin_id()) && match_any(env, list, changes_decision->origin_id());
}
void serialise_resolved(StringListStream & ser_stream, const Resolved & resolved)