From da6d239d0771142b795d18105aac8d130e85c5ba Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 28 Jul 2023 14:18:53 +0300 Subject: Add another test case for pkg_configure() flaws --- bpkg/pkg-configure.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'bpkg') diff --git a/bpkg/pkg-configure.cxx b/bpkg/pkg-configure.cxx index 5bb7dfa..57ac5ac 100644 --- a/bpkg/pkg-configure.cxx +++ b/bpkg/pkg-configure.cxx @@ -99,17 +99,20 @@ namespace bpkg // // @@ It seems there is a hole in the reconfiguration mode: // - // foo -> libfoo {require {config.libfoo.proto=1} + // foo -> libfoo {prefer {config.libfoo.proto=1} accept(true) // reflect {config.foo.reflect=1}} | - // libfoo {require {config.libfoo.proto=2} + // libfoo {prefer {config.libfoo.proto=2} accept(true) // reflect {config.foo.reflect=2}} - // -> libbar {require {config.libfoo.proto=2}} + // -> libbar {prefer {config.libbar.proto=$config.libfoo.proto} + // accept (config.libbar.proto=2)} // -> libbaz // - // foo is configured with config.foo.reflect=2 + // foo is configured with config.foo.reflect=2 initially. // - // If afterwords libbaz is upgraded, the foo is - // reconfigured with config.foo.reflect=1 + // If afterwords libbaz is upgraded, the foo is reconfigured with + // config.foo.reflect=1 just because we erroneously pick the first + // libfoo alternative (which has been banned by libbar accept clause + // on the previous pkg-build run during negotiation). // // It feels more and more that the proper solution here is to go // "nuclear" and to always "upgrade" re-configuration for a package -- cgit v1.1