This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH setup] Finish providing support for provides: and conflicts:
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 6 Jul 2018 18:19:15 -0400
- Subject: Re: [PATCH setup] Finish providing support for provides: and conflicts:
- References: <20180321193807.11744-1-kbrown@cornell.edu> <dac0ef15-a58f-a2e4-9b32-1b66c68c43c1@cornell.edu> <a6938431-ea1f-2ecd-c885-cd824e554ced@dronecode.org.uk> <6fb8aceb-7a04-36e8-c14f-4d182bd27e1e@dronecode.org.uk> <d22db911-fb3d-9da9-a323-1f3d36c6a61a@cornell.edu> <c2c96d77-6643-5145-9d3a-4b4d2c1cc856@cornell.edu> <220ce253-6dcb-18fd-fcfd-cca3b2aca517@cornell.edu> <e50cc9fd-66c7-17c6-b367-5a8fb0e15ce6@dronecode.org.uk>
On 7/6/2018 12:28 PM, Jon Turney wrote:
On 23/06/2018 16:09, Ken Brown wrote:
I'll try again to reproduce this, but it might be a few days until I
can get to it.
Here's a recipe for reproducing the problem:
1. Create a repository with two packages, A and B, and two versions
1-1 and 2-1 of each. Make A-1-1 require B>=1, and make A-2-1 require
B>=2. The attached script does all this.
2. Run setup on this repo and install A-1-1 and B-1-1.
3. Run setup again. It will offer to update both A and B. Choose to
keep B and press 'Next'.
setup built from the current HEAD correctly reports the dependency
problem. But if I apply my patch, then setup doesn't report the
problem and lets me proceed to update A without updating B.
Thanks very much for this testcase, it helped a lot.
This looks like completely my fault: SolvableVersion::deplist()'s
handling of dependencies with a version relation was completely bogus.
Great. I'm glad the problem turned out to have an easy fix.
So provides() on B was always returning unversioned B, rather than
B-1-1, so the installed B ended up with that as provides, which appears
to be enough to satisfy a depends of B-2-1.
(previously we'd just have the correct, implicit provide made at
libsolv.cpp:472)
Attached patch seems to make it work.
I can confirm that it fixes my testcase.
Ken