[Yum-devel] [dnf] new build: dnf-0.3.2-1

James Antill james at fedoraproject.org
Tue Apr 9 14:17:45 UTC 2013

On Tue, 2013-04-09 at 10:53 +0200, Ales Kozumplik wrote:
> On 04/08/2013 08:59 PM, James Antill wrote:

> >   I'm also kind of curious about how many users who do a global config.
> > of something like exclude=kernel, never want to be able to see the
> > installed kernel packages unless they use --disableexcludes (or never if
> > they are using PK, I guess).
> It's all about a tradeoff. Either they can be confused they don't see 
> kernel after they excluded it or be confused they can see it yet can't 
> upgrade it.

 Not really, they just can't exclude installed packages because there is
no way to do that in rpm and it would generally be a huge mistake if it
was possible. And even if you solved all of that, they are still _there_
and all the tools and users have to act as if they do ... so it just
makes no sense to exclude them in that way.

>  My take is that excluding on all commands is more consistent.

 Excludes currently applies to all "available" packages, and makes them
disappear. You've changed it so it also has a second function where it
kind of excludes the installed packages, but hopefully not 100% because
that would be bad ... and maybe you'll turn the second part off for
certain commands too?
 This is "more consistent"?

> >   You should also add a note that dnf excludes are name only currently
> > (at least the code implies that), although that might be a feature as
> > otherwise it might be hard to make sure someone doesn't do
> > "dnf -x foo-1.1.1 install foo" when foo-1.1.2 is available.
> Both the dnf(8) and dnf.conf(8) say so.

 I'd looked at the commit, and seen the note in cli_vs_yum.rst about how
yum "only respects excludes during install/upgrade" but nothing
suggesting that excludes are only name based now.

>  Out of curiosity: if one 
> excludes a particular NVR in yum and then upgrades the package by name, 
> does the exclude version apply to the updating or the updated package?

 In yum excludes/includepkgs are just the same wildcard matches we use
everywhere, and the original implementation worked kind of like:

 for pkg in yb.pkgSack.returnPackages(patterns=excludes):

...so, yes, you can exclude and match against arches or versions and it
works as if the packages which match were never in the repos. to start
with, in the same consistent way as if you matched on just the name.

More information about the Yum-devel mailing list