aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-16 15:09:28 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-16 15:09:28 +0100
commit27a34dddc2a4b88072f4bee33cc107f9cc3c7bc2 (patch)
tree6dd0230cbb09b9a5d31b81345d78240c60def386
parent056fe3508f705e7a956081cc7ec2490df333ba52 (diff)
downloadpaludis-27a34dddc2a4b88072f4bee33cc107f9cc3c7bc2.tar.gz
paludis-27a34dddc2a4b88072f4bee33cc107f9cc3c7bc2.tar.xz
Don't start fetches until fetch deps are done
-rw-r--r--paludis/resolver/job_requirements.se1
-rw-r--r--paludis/resolver/orderer.cc18
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc2
3 files changed, 16 insertions, 5 deletions
diff --git a/paludis/resolver/job_requirements.se b/paludis/resolver/job_requirements.se
index ab9b52d..dc2c649 100644
--- a/paludis/resolver/job_requirements.se
+++ b/paludis/resolver/job_requirements.se
@@ -9,6 +9,7 @@ make_enum_JobRequirementIf()
key jri_require_for_satisfied "Require it if we're in if-satisfied mode"
key jri_require_for_independent "Require it if we're in if-independent mode"
key jri_require_always "Always require it"
+ key jri_fetching "Require before fetching"
want_destringify
}
diff --git a/paludis/resolver/orderer.cc b/paludis/resolver/orderer.cc
index 2b34483..f8a1fa8 100644
--- a/paludis/resolver/orderer.cc
+++ b/paludis/resolver/orderer.cc
@@ -672,9 +672,14 @@ namespace
const NAGIndex & index,
const std::tr1::shared_ptr<JobRequirements> & requirements,
const bool is_uninstall,
+ const bool is_fetch,
const bool recursing,
RecursedRequirements & recursed)
{
+ JobRequirementIfs basic_required_ifs;
+ if (is_fetch)
+ basic_required_ifs += jri_fetching;
+
if (! recursing)
for (NAG::EdgesFromConstIterator e(nag->begin_edges_from(index)),
e_end(nag->end_edges_from(index)) ;
@@ -686,7 +691,7 @@ namespace
if (n != change_or_remove_job_numbers.end())
requirements->push_back(make_named_values<JobRequirement>(
n::job_number() = n->second,
- n::required_if() = JobRequirementIfs() + jri_require_for_satisfied
+ n::required_if() = basic_required_ifs + jri_require_for_satisfied
));
}
}
@@ -700,9 +705,10 @@ namespace
if (n != change_or_remove_job_numbers.end())
requirements->push_back(make_named_values<JobRequirement>(
n::job_number() = n->second,
- n::required_if() = JobRequirementIfs() + jri_require_for_independent
+ n::required_if() = basic_required_ifs + jri_require_for_independent
));
- populate_requirements(nag, change_or_remove_job_numbers, e->first, requirements, is_uninstall, true, recursed);
+ populate_requirements(nag, change_or_remove_job_numbers, e->first, requirements,
+ is_uninstall, is_fetch, true, recursed);
}
}
}
@@ -797,7 +803,8 @@ namespace
const std::tr1::shared_ptr<JobRequirements> requirements(new JobRequirements);
requirements->push_back(make_named_values<JobRequirement>(
n::job_number() = fetch_job_n->second,
- n::required_if() = JobRequirementIfs() + jri_require_for_satisfied + jri_require_for_independent + jri_require_always
+ n::required_if() = JobRequirementIfs() + jri_require_for_satisfied + jri_require_for_independent
+ + jri_require_always + jri_fetching
));
RecursedRequirements recursed;
@@ -808,6 +815,7 @@ namespace
requirements,
false,
false,
+ false,
recursed
);
@@ -840,6 +848,7 @@ namespace
index,
requirements,
false,
+ true,
false,
recursed
);
@@ -875,6 +884,7 @@ namespace
requirements,
true,
false,
+ false,
recursed
);
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index e80f555..ef4e4cd4 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -1119,7 +1119,7 @@ namespace
for (JobRequirements::ConstIterator r(job->requirements()->begin()), r_end(job->requirements()->end()) ;
r != r_end ; ++r)
{
- if (! r->required_if()[jri_require_always])
+ if (! r->required_if()[jri_fetching])
continue;
const std::tr1::shared_ptr<const ExecuteJob> req(*lists->execute_job_list()->fetch(r->job_number()));