From e90ef86700d0e02fc1bd7129e769691dd9a480a0 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Tue, 18 Dec 2018 16:55:29 +0100 Subject: [PATCH] Add testcase for the last commit --- ext/testcase.c | 1 + test/testcases/strongrecommends/disfavored.t | 34 ++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 test/testcases/strongrecommends/disfavored.t diff --git a/ext/testcase.c b/ext/testcase.c index 31fe4e9c..7ec2f007 100644 --- a/ext/testcase.c +++ b/ext/testcase.c @@ -1818,6 +1818,7 @@ static struct rclass2str { { SOLVER_RULE_LEARNT, "learnt" }, { SOLVER_RULE_BEST, "best" }, { SOLVER_RULE_YUMOBS, "yumobs" }, + { SOLVER_RULE_RECOMMENDS, "recommends" }, { 0, 0 } }; diff --git a/test/testcases/strongrecommends/disfavored.t b/test/testcases/strongrecommends/disfavored.t new file mode 100644 index 00000000..14792fa5 --- /dev/null +++ b/test/testcases/strongrecommends/disfavored.t @@ -0,0 +1,34 @@ +# test strong recommends +# +# with normal recommends, the solver will +# not backtrack to fulfill them. +# +repo system 0 testtags +#>=Pkg: A 1 1 noarch +#>=Con: C +#>=Pkg: A2 1 1 noarch +#>=Con: C2 +repo available 0 testtags +#>=Pkg: A 1 2 noarch +#>=Pkg: B 1 1 noarch +#>=Rec: C +#>=Pkg: C 1 1 noarch +#>=Pkg: B2 1 1 noarch +#>=Rec: C2 +#>=Pkg: C2 1 1 noarch +#>=Pkg: D 1 1 noarch +#>=Prv: C +#>=Pkg: E 1 1 noarch +#>=Prv: C +system i686 rpm system +solverflags strongrecommends +job install name B +job install name B2 +job disfavor name C +result transaction,problems,alternatives +#>alternative 6b91d100 1 + D-1-1.noarch@available +#>alternative 6b91d100 2 E-1-1.noarch@available +#>install B-1-1.noarch@available +#>install B2-1-1.noarch@available +#>install D-1-1.noarch@available +#>upgrade A-1-1.noarch@system A-1-2.noarch@available -- 2.47.2