[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-devel-list
Subject:    Re: DNF vs YUM, $pkg, $pkg-mpi, $pkg-openmpi having same provides
From:       James Antill <james () fedoraproject ! org>
Date:       2015-06-16 19:16:27
Message-ID: 1434482187.17364.134.camel () code ! and ! org
[Download RAW message or body]

On Fri, 2015-06-12 at 15:09 +0200, Kalev Lember wrote:
> On 06/12/2015 10:28 AM, Radek Holy wrote:
> > If a package "Requires: foo" and both "bar" and "barbaz" "Provides:
> > foo", they are handled as being equally suitable. DNF/libsolv is not
> > going to prefer packages with shorter names.
> 
> Yes, very much agreed here. Please don't add the yum shortest name hack
> to DNF. This and the rest of the depsolving quirks that choose one
> provider over the other depending on what else happens to be installed,
> have made my life quite hard over the years :)

 You would rather have it undocumented and/or random which of the
providers it chooses ... and this will make your life easier? Ok.

> With the yum system, yum would pretty much always just pick the shortest
> name. It _happened_ to be PackageKit-yum, but that was totally an
> accident. And it made it impossible to change the default without
> renaming the packages - so in a new release that was supposed to use
> hawkey, we'd have very little options besides renaming PackageKit-hawkey
> to PackageKit-h for example to make sure it wins over -yum.

 That's not true, the obvious change would be to have versions on the
provide and have the hawkey (default) one be higher. This comes before
shortest name (which is the last thing yum uses):

http://yum.baseurl.org/wiki/CompareProviders

...although it would also just work if yum wasn't installed by default,
given the yum backend would bring in a bunch more deps.

 Although, to be fair, this case is a bit more complicated as you'd want
to migrate everyone on the -yum backend to the -hawkey backend ... so
you can't just rely on new install defaults to accomplish that, random
or documented.

> What I feel would be a good solution to the problem above would be to
> have a way to specify the default. I believe this problem is already
> solved in apt-get with a very nice syntax: the OR syntax:
> 
> Requires: PackageKit-hawkey | PackageKit-backend

 Look at the weak deps. and rich deps. work, which might help here (but
again, not really in the case you chose).

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic