public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Portage dependency solving algorithm
Date: Sat, 08 Nov 2014 14:39:49 -0800	[thread overview]
Message-ID: <545E9BB5.9000402@gentoo.org> (raw)
In-Reply-To: <545E939A.1030806@gentoo.org>

On 11/08/2014 02:05 PM, hasufell wrote:
> On 11/08/2014 10:52 PM, Jauhien Piatlicki wrote:
>> 08.11.14 22:47, hasufell написав(ла):
>>> On 11/08/2014 10:30 PM, Rich Freeman wrote:
>>>> On Sat, Nov 8, 2014 at 2:48 PM, hasufell <hasufell@gentoo.org> wrote:
>>>>> On 11/08/2014 08:32 PM, hasufell wrote:
>>>>>>> Sorry to chime in like that but if you don't mind, I'd like to ask for a
>>>>>>> real-life example for badly declared dependencies with a few words why
>>>>>>> those are bad and how to make them actually better?
>>>>>>>
>>>>>>
>>>>>> from dev-haskell/hashtables (note "hashtables" != "hashable"):
>>>>>> || ( ( >=dev-haskell/hashable-1.1:=[profile?]
>>>>>>        <dev-haskell/hashable-1.2:=[profile?] )
>>>>>>      ( >=dev-haskell/hashable-1.2.1:=[profile?]
>>>>>>        <dev-haskell/hashable-1.3:=[profile?] )
>>>>>>    )
>>>>>>
>>>>>> Latest stable version of dev-haskell/hashable is 1.2.1.0.
>>>>>> On a stable system (arch) the paludis dep-solver will try to match the
>>>>>> first group first and realize that there is also a stable version
>>>>>> 1.1.2.5 that matches that group. At that point there is a correct
>>>>>> solution, but since that involves downgrading a package, it will require
>>>>>> user-intervention, because it may not be what the user wants.
>>>>>> (this is the easy scenario... if downgrading causes blockers, you get
>>>>>> much more interesting output)
>>>>>>
>>>>>
>>>>> To be more specific... it is assumed that hashable-1.2.1.0 is already
>>>>> installed. Every time the dep solver runs through those packages without
>>>>> specifying what you want, you will hit the downgrade-problem.
>>>>
>>>> I'm missing the problem.  The package requires one of two ranges of
>>>> hashable versions.  One of them is already installed.  The dependency
>>>> is satisfied.
>>>>
>>>
>>> The one that is installed (1.2.1.0) is *excluded* by the first group,
>>> but there is a valid version that fits instead (1.1.2.5).
>>>
>>> That's the point where the assumptions start about what the depstring
>>> means and what the user wants.
>>>
>>
>> So the problem is only with intervals? First of all, maintainer would specify higher interval first here and it would solve a problem with possible downgrading.
> 
> I have a feeling that this is an assumption as well. PMS just says this
> is an 'any-of' group. There is not a single word about the processing
> order of these specs or which one to prefer, in which case some is
> better than the other and so on.

I think the two obvious algorithms are:

A) If the user's resolver parameters request maximum upgrades, then the
resolver should choose the choice that results the most upgrades.

B) If the user's resolver parameters request minimum change, then the
resolver should choose the choice which results in keeping the most
installed packages in place.

For the dev-haskell/hashtables scenario, the choice on the right wins
regardless of whether you're using algorithm A or algorithm B.
-- 
Thanks,
Zac


  reply	other threads:[~2014-11-08 22:40 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 12:49 [gentoo-dev] Regarding my final year thesis Harsh Bhatt
2014-11-06 13:25 ` Jauhien Piatlicki
2014-11-06 13:43   ` Ciaran McCreesh
2014-11-06 15:18     ` Ian Stakenvicius
2014-11-06 15:26       ` Ciaran McCreesh
2014-11-07  9:42     ` [gentoo-dev] Portage dependency solving algorithm (WAS: Regarding my final year thesis) Jauhien Piatlicki
2014-11-07 17:36       ` Zac Medico
2014-11-07 18:07       ` Ciaran McCreesh
2014-11-07 18:11         ` Jauhien Piatlicki
2014-11-07 18:30           ` Ciaran McCreesh
2014-11-07 18:54             ` [gentoo-dev] Portage dependency solving algorithm Matthias Maier
2014-11-07 19:08               ` hasufell
2014-11-07 19:56                 ` Jauhien Piatlicki
2014-11-07 20:44                   ` hasufell
2014-11-07 20:55                     ` Jauhien Piatlicki
2014-11-07 21:04                       ` hasufell
2014-11-07 21:41                         ` Zac Medico
2014-11-08 13:40                         ` Ciaran McCreesh
2014-11-08  8:29                 ` vivo75
2014-11-08 13:35                   ` Ciaran McCreesh
2014-11-08 14:08                     ` vivo75
2014-11-08 11:10                 ` Andrew Savchenko
2014-11-08 13:24                 ` Patrick Lauer
2014-11-08 14:48                   ` hasufell
2014-11-08 23:33                     ` Patrick Lauer
2014-11-08 23:45                       ` Zac Medico
2014-11-09  6:53                         ` Andrew Savchenko
2014-11-09  8:15                           ` Zac Medico
2014-11-18  3:07                             ` Andrew Savchenko
2014-11-18  3:56                               ` Zac Medico
2014-11-18  5:47                                 ` Andrew Savchenko
2014-11-18  5:55                                   ` Zac Medico
2014-11-19 19:59                                     ` Andrew Savchenko
2014-11-20  2:44                                       ` Andrew Savchenko
2014-11-20 20:19                                       ` Zac Medico
2014-11-21  4:16                                         ` Zac Medico
2014-11-24  1:50                                           ` Andrew Savchenko
2014-11-24  2:34                                             ` Zac Medico
2014-11-24  7:41                                             ` Alexander Berntsen
2014-11-18  7:04                                 ` Zac Medico
2014-11-09  0:04                       ` hasufell
2014-11-09  0:08                         ` Patrick Lauer
2014-11-09  0:10                           ` hasufell
2014-11-09 12:43                       ` Ciaran McCreesh
2014-11-07 19:21               ` Ciaran McCreesh
2014-11-07 19:57                 ` Jauhien Piatlicki
2014-11-08 13:40                   ` Ciaran McCreesh
2014-11-08 18:11                     ` Hilco Wijbenga
2014-11-08 18:26                       ` Ciaran McCreesh
2014-11-08 19:01                         ` Matthias Dahl
2014-11-08 19:32                           ` hasufell
2014-11-08 19:48                             ` hasufell
2014-11-08 21:30                               ` Rich Freeman
2014-11-08 21:47                                 ` hasufell
2014-11-08 21:52                                   ` Jauhien Piatlicki
2014-11-08 22:05                                     ` hasufell
2014-11-08 22:39                                       ` Zac Medico [this message]
2014-11-08 23:52                                         ` hasufell
2014-11-08 23:58                                           ` Zac Medico
2014-11-09 12:41                                     ` Ciaran McCreesh
2014-11-09 12:40                                 ` Ciaran McCreesh
2014-11-09 12:34                           ` Ciaran McCreesh
2014-11-07 20:06                 ` Matthias Maier
2014-11-08 10:56                 ` Andrew Savchenko
2014-11-08 20:59                   ` [gentoo-dev] " Duncan
     [not found]                   ` <20141108133520.6ec790fe@googlemail.com>
2014-11-09  6:57                     ` [gentoo-dev] " Andrew Savchenko
2014-11-06 21:28   ` [gentoo-dev] Regarding my final year thesis Jeroen Roovers
2014-11-07  5:06     ` Harsh Bhatt
2014-11-07  9:49       ` Luca Barbato
2015-01-16 17:30         ` Jan Matejka
2015-01-16 20:00           ` Luca Barbato
2015-02-02 17:26             ` Jan Matejka
2015-02-02 18:01               ` hasufell
2015-02-06 16:34                 ` Alexander Berntsen

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=545E9BB5.9000402@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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