On 10/7/2018 6:02 PM, Ken Brown wrote: > I've been experimenting with setup's support for the 'provides:' tag, and it's > not behaving the way I expect [*]. I'm not sure if something in setup's > interface with libsolv needs to be tweaked or if I'm just misunderstanding how > this should work. Here's what I tried: > > I created a test repo with packages A, B, and C. I made A require foo (not a > package), and I made B and C provide foo. The attached script does all this > [**]. I then ran setup and selected A for installation. > > The result was that libsolv simply chose B for installation, and setup showed > this in the "Confirm" dialog. What I expected was that libsolv would report a > problem ("A requires foo but no selected or installed packages provide it"), > with two possible solutions ("Install B or C"). Is that expectation > unreasonable? > > I plan to look into the libsolv sources to see if I can fix this, but I'm > hoping > that someone already knows the answer.
It turns out that this question has been asked before: https://bugzilla.redhat.com/show_bug.cgi?id=1266761#c3 https://github.com/openSUSE/libsolv/issues/107 AFAICT, libsolv will by default pick the alphabetically first package when there are several equally good candidates to meet the requirements. According to the second link I cited, "libsolv offers methods to query for the encountered ambiguities after the solving, so that the user can be presented with a list of choices and then select different packages." I may look into this further, but I'm beginning to wonder if it's worth the trouble. Ken