aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-23 17:24:41 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-23 17:24:41 +0100
commitd99160c97e3f5fb98293adb42928821192113053 (patch)
tree9cefa63b6dbbf0af13ebfc391adbdc5469c798c5
parent71e73034a1410ea95c4a9c14fa16824dd6f88552 (diff)
downloadpaludis-d99160c97e3f5fb98293adb42928821192113053.tar.gz
paludis-d99160c97e3f5fb98293adb42928821192113053.tar.xz
Get 'all met' right for multiple deps in cycles
Fixes: ticket:1003
-rw-r--r--paludis/resolver/nag.cc2
-rw-r--r--paludis/resolver/resolver_TEST_cycles.cc31
-rwxr-xr-xpaludis/resolver/resolver_TEST_cycles_setup.sh27
3 files changed, 60 insertions, 0 deletions
diff --git a/paludis/resolver/nag.cc b/paludis/resolver/nag.cc
index e064548..a76d42e 100644
--- a/paludis/resolver/nag.cc
+++ b/paludis/resolver/nag.cc
@@ -470,7 +470,9 @@ NAGEdgeProperties &
NAGEdgeProperties::operator|= (const NAGEdgeProperties & other)
{
build() |= other.build();
+ build_all_met() &= other.build_all_met();
run() |= other.run();
+ run_all_met() &= other.run_all_met();
return *this;
}
diff --git a/paludis/resolver/resolver_TEST_cycles.cc b/paludis/resolver/resolver_TEST_cycles.cc
index 75e55d9..3aa2998 100644
--- a/paludis/resolver/resolver_TEST_cycles.cc
+++ b/paludis/resolver/resolver_TEST_cycles.cc
@@ -365,5 +365,36 @@ namespace test_cases
);
}
} test_cycle_deps;
+
+ struct TestBuildAgainstBlock : ResolverCyclesTestCase
+ {
+ TestBuildAgainstBlock() :
+ ResolverCyclesTestCase("build against block")
+ {
+ }
+
+ void run()
+ {
+ std::shared_ptr<const Resolved> resolved(get_resolved("build-against-block/target"));
+
+ check_resolved(resolved,
+ n::taken_change_or_remove_decisions() = make_shared_copy(DecisionChecks()
+ .change(QualifiedPackageName("build-against-block/dep-b"))
+ .change(QualifiedPackageName("build-against-block/dep-a"))
+ .change(QualifiedPackageName("build-against-block/target"))
+ .finished()),
+ n::taken_unable_to_make_decisions() = make_shared_copy(DecisionChecks()
+ .finished()),
+ n::taken_unconfirmed_decisions() = make_shared_copy(DecisionChecks()
+ .finished()),
+ n::taken_unorderable_decisions() = make_shared_copy(DecisionChecks()
+ .finished()),
+ n::untaken_change_or_remove_decisions() = make_shared_copy(DecisionChecks()
+ .finished()),
+ n::untaken_unable_to_make_decisions() = make_shared_copy(DecisionChecks()
+ .finished())
+ );
+ }
+ } test_build_against_block;
}
diff --git a/paludis/resolver/resolver_TEST_cycles_setup.sh b/paludis/resolver/resolver_TEST_cycles_setup.sh
index 086ec12..814c164 100755
--- a/paludis/resolver/resolver_TEST_cycles_setup.sh
+++ b/paludis/resolver/resolver_TEST_cycles_setup.sh
@@ -255,5 +255,32 @@ SLOT="0"
DEPENDENCIES="build: cycle-deps/dep-c"
END
+# build-against-block
+echo 'build-against-block' >> metadata/categories.conf
+
+mkdir -p 'packages/build-against-block/target'
+cat <<END > packages/build-against-block/target/target-1.exheres-0
+SUMMARY="target"
+PLATFORMS="test"
+SLOT="0"
+DEPENDENCIES="build-against-block/dep-a"
+END
+
+mkdir -p 'packages/build-against-block/dep-a'
+cat <<END > packages/build-against-block/dep-a/dep-a-2.exheres-0
+SUMMARY="dep"
+PLATFORMS="test"
+SLOT="0"
+DEPENDENCIES="build+run: !build-against-block/dep-b[<2] build-against-block/dep-b[~2]"
+END
+
+mkdir -p 'packages/build-against-block/dep-b'
+cat <<END > packages/build-against-block/dep-b/dep-b-2.exheres-0
+SUMMARY="dep"
+PLATFORMS="test"
+SLOT="0"
+DEPENDENCIES="!build-against-block/dep-a[<2]"
+END
+
cd ..