From: Ken Brown <kbrown@cornell.edu>
To: cygwin-apps@cygwin.com
Subject: Re: [setup topic/libsolv] Does "obsoletes:" work?
Date: Tue, 24 Oct 2017 20:25:00 -0000 [thread overview]
Message-ID: <47d9f129-3c05-821e-56af-177bab31c355@cornell.edu> (raw)
In-Reply-To: <d0f6bd0c-f408-6cfb-1ae4-99a4dbc8b416@dronecode.org.uk>
On 10/24/2017 4:09 PM, Jon Turney wrote:
> On 23/10/2017 18:43, Ken Brown wrote:
>> On 10/23/2017 7:38 AM, Jon Turney wrote:
>>> On 21/10/2017 21:18, Ken Brown wrote:
>>>> On 10/20/2017 6:24 PM, Ken Brown wrote:
>>>>> Have you ever tested the "obsoletes:" feature of setup/libsolv? I
>>>>> tried adding an "obsoletes:" line to setup.ini, and it didn't seem
>>>>> to have any effect.
>>>
>>> It seems I tested it back in May, so it might well have broken since :)
>>>
>>> Here's a very small test repo I've been using for some tests:
>>> http://www.dronecode.org.uk/cygwin/test/x86_64/
>>>
>>> But yes, your patch looks like it's needed for it to work correctly...
>>>
>>>> It turns out that it *is* working (after a minor fix, attached), but
>>>> not always as I expect. Suppose A requires B and C obsoletes B.
>>>> Then the "obsoletes" statement appears to have no effect. If I
>>>> remove the dependence of A on B, then setup does propose
>>>> uninstalling B and installing C.
>>>>
>>>> I guess the issue is that libsolv interprets "C obsoletes B" as
>>>> "uninstall B and install C", and it won't uninstall B while
>>>> something requires it.
>>>
>>> The 'targeted' vs. 'untargeted' distinction is relevant here? Perhaps
>>> we are doing the wrong one?
>>
>> Maybe. I've read and re-read the discussion of this in
>> libsolv-bindings.txt, and I'm still not sure I understand it.
>
> Yeah, the documentation is a bit impenetrable.
>
>> But here's a simpler case where "obsoletes" isn't working as I expect.
>> Using your test repo, in which A requires C and obsoletes B, I start
>> with none of the packages installed. I choose B for installation
>> (either interactively or on the command line), and B gets installed.
>> If I now run setup a second time, A and C get installed and B gets
>> uninstalled.
>>
>> I expected A and C to be installed on the first run. I don't think
>> this has anything to do with targeted vs. untargeted, because that
>> distinction is only relevant for updating installed packages.
>
> I guess I had the opposite expectation (if I ask for A to be installed,
> that's what should happen, because if it insists on upgrading it behind
> my back there's no way to do that...)
>
> The actual behaviour you mention fits what's described there pretty well.
OK, so maybe there's no real problem here. In any case, the situation
is unlikely to happen often -- the user has to intentionally choose to
install an obsolete package.
I think we might have reached the point where more widespread testing
would be useful. If it would help, I could put together a patch series
containing the various (sometimes revised) patches we've discussed recently.
Ken
next prev parent reply other threads:[~2017-10-24 20:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 22:25 Ken Brown
2017-10-21 20:19 ` Ken Brown
2017-10-23 11:38 ` Jon Turney
2017-10-23 17:44 ` Ken Brown
2017-10-24 20:09 ` Jon Turney
2017-10-24 20:25 ` Ken Brown [this message]
2017-10-24 20:37 ` Jon Turney
2017-10-24 21:33 ` Ken Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47d9f129-3c05-821e-56af-177bab31c355@cornell.edu \
--to=kbrown@cornell.edu \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).