Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1055910 - [rfe] includes directive support should work with no excludes defined
Summary: [rfe] includes directive support should work with no excludes defined
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Fedora Extras Quality Assurance
: 1062872 (view as bug list)
Depends On:
Blocks: 871892
TreeView+ depends on / blocked
Reported: 2014-01-21 08:27 UTC by nicolas.vieville
Modified: 2017-07-12 17:47 UTC (History)
26 users (show)

Fixed In Version: hawkey-0.5.3-2.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-21 15:01:50 UTC

Attachments (Terms of Use)

Description nicolas.vieville 2014-01-21 08:27:47 UTC

As this has already been reported by error in #871892 (sorry Ales), I noticed that dnf doesn't uses the includepkgs directive in repositories configuration files (.repo) as yum does. I must indicate that no other directive regarding including or excluding packages are in use in the repositories sections. 
For example, while using yum, if I add the following directive in a repository section:

includepkgs=dnf yum

only dnf and yum would be installed/updated/upgraded from that repository. The others packages from that repository wouldn't be taken in account.
While using dnf, there seems that the includepkgs directive is ignored, and all the packages from that repository are taken in account. 

What I understood about this directive with yum, is that it includes only the list packages but not all the others, while the exclude directive includes all the packages but not the listed ones. Maybe I'm wrong.

Hope this functionality will be added to dnf in order to make it fully usable and replace yum in mixed repositories environments.



Comment 1 Ales Kozumplik 2014-01-21 10:05:37 UTC
Thanks, yes we will try to take a look before the final release, especially if there is more users requesting this.

Comment 2 Ales Kozumplik 2014-02-06 09:27:12 UTC
Hi Ivana, please take a look at this as your starting bug. I recommend looking at how excludes are implemented in dnf and in hawkey and then just going through the given repo and excluding everything that does not match the pattern.

Don't forget to update the documentation.

I'll be glad to help if you run into issues or questions.

Comment 3 Ales Kozumplik 2014-02-10 08:11:06 UTC
*** Bug 1062872 has been marked as a duplicate of this bug. ***

Comment 4 Ales Kozumplik 2014-07-16 10:02:40 UTC
Also see bug 1099342 comment 10, it's plausible we'll have to change how excludes/includes are implemented in hawkey.

Comment 5 Honza Silhan 2014-08-11 14:17:14 UTC
include directive added to dnf.conf. Note: in dnf it's called "include" not "includepkgs" as it's in yum.

Comment 6 Gerald Cox 2014-12-10 18:25:01 UTC
This doesn't appear to be working, unless I'm missing something.  If I put:
in the repo file, when executing dnf upgrade, the repo is unceremoniously 
skipped with the error message:
Warning: failed loading '/etc/yum.repos.d/fedora-updates.repo', skipping.

If I use (which shouldn't work at all):
the statement is just ignored, but the repo is at least accepted for processing.

Here is what I have installed for dnf:


Comment 7 Gerald Cox 2014-12-10 18:25:45 UTC
Updated product info.

Comment 8 Gerald Cox 2014-12-11 01:29:44 UTC
I installed the following from rawhide and the issue still exists:


Comment 9 Honza Silhan 2014-12-12 15:40:39 UTC
Gerald, you're right. includes could be set from `--setopt` option but in config it conflicted with another option. PR which fix this is created.

Comment 10 Fedora Update System 2015-02-16 00:03:42 UTC
dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 has been submitted as an update for Fedora 21.,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21

Comment 11 Fedora Update System 2015-02-17 08:04:33 UTC
Package hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hawkey-0.5.3-2.fc21 dnf-plugins-core-0.1.5-1.fc21 dnf-0.6.4-1.fc21'
as soon as you are able to.
Please go to the following url:,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2015-02-20 08:32:57 UTC
hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 nicolas.vieville 2015-05-29 14:55:23 UTC

Sorry for re-opening this bug report.

After upgrading to F-22 (which is using dnf as the default package manager), I just realised that the problem still persist. 

The upgrade went well, but the includepkgs directives included in my /etc/yum.repos.d files were ignored while the upgrade process, and then some non-official Fedora packages were upgraded the wrong way. For example, with a remi.repo file before the upgrade like this:

name=Les RPM de remi - Fedora $releasever - $basearch
includepkgs=bluegriffon remi-release libdvdcss

all the php* packages already installed were upgraded to remi's repo ones.

Now that the machine is in this state, I tried to modify the repo file as this (according to the dnf documentation the includepkgs directive was replaced by include and coma separated list):

name=Les RPM de remi - Fedora $releasever - $basearch

in order to revert the php* packages to the official Fedora ones via the distribution-synchronization command of dnf.
But unfortunately, this has failed. Nothing to do is the dnf response.
Maybe I misunderstood the new include and exclude options, and how to set them up in the /etc/yum.repos.d files, but my question is: how to get this working as it was working with yum (see my description in the first post)?

I tried adding the exclude=* directive in the remi-nico section in the remi.repo file, but there seems that it is evaluated globally, and not just for that repository only, because no packages are listed by dnf.

Any comment about this are welcome.



Comment 14 Elliott Sales de Andrade 2015-05-30 04:30:04 UTC
Seeing the same problem. dnf distro-sync wants to pull in packages from remi just after the F22 upgrade.

Comment 15 nicolas.vieville 2015-06-19 07:48:54 UTC

After a little playing with dnf and /etc/yum.repos.d/*.repo files, there seems that include and exclude directives are not working as old yum includepkgs and exclude directive were. 

Actually, with F-22 using include directive in one .repo file, it is not possible to allow exclusively some packages from a repository but all.
Adding the exclude directive left blank (i.e. exclude=) in a .repo file makes dnf globally blind but not "repo specific" (tried dnf check-update and got "nothing to do" while removing exclude blank directive gives some results). 

Tell me if I could do something more to try to catch this issue.

Any comments about this are welcome.

Actually, in order to keep F-22 functional (not breaking it with all the packages provided by third-party repositories) with a few of special packages from third-party repositories, one needs to disable all third-party repositories and upgrade manually and explicitly each package for each third-party repository enabling them manually (--enablerepo command line option).

Hope something could be done in order to get old yum usage back in dnf (as dnf is the only solution for F-22).



Comment 16 nicolas.vieville 2015-07-16 04:51:38 UTC

Sorry for the noise, bt is there any news since comment #13 about this really useful functionality provided by yum and in the way to be available for dnf?



Comment 17 Stefan Neufeind 2015-08-05 20:23:38 UTC
Should we maybe raise this to Fedora 22, as it is still current?

Comment 18 Kevin R. Page 2015-08-13 12:44:02 UTC
To note why this bug has affected me recently, as this may be a common scenario that will silently cause unexpected package installs.

I have an (upgraded) F22 install. I had the remi repo set up to only "includepkgs= remi-release libdvdcss"

Nothing out of the ordinary until last week, when some php-* packages were added to the remi repo which overwrote the standard Fedora packages -- which is not the behaviour I desire.

I've had to manually downgrade the packages and disable the repo.

Note that I only spotted this as I was using dnf on the command line. I suspect that, if I'd been using gnome software, the packages would have been upgraded to the non-Fedora versions (not desired).

Before last week there was no indication this was a problem, it was just silently continuing to use the repo.

So it seems like a fairly bad downgrade of feature parity, especially in the case of upgraded installations, as it silently puts the installed packages into an unwanted and unexpected state.

Comment 19 Remi Collet 2015-09-15 13:38:00 UTC
Seems a duplicate of 1219867

As yes, this make dnf unusable for now.

Comment 20 Edgar Hoch 2015-09-15 18:30:04 UTC
I think this bug should be raised to Fedora 22, because Fedora 22 is more affected as dnf is the default package manager, but in Fedora 21 yum is the default.

This bug makes it more difficult to use only for libdvdcss but prevent accidental updating of other packages which are also in this repo.

Comment 21 Ashesh Kumar Singh 2015-12-20 20:26:02 UTC
any updates on this?

Comment 22 George Galt 2015-12-31 13:54:51 UTC
(In reply to Ashesh Kumar Singh from comment #21)
> any updates on this?

Me too, on F23.

Comment 23 Orsiris de Jong 2016-01-05 14:29:48 UTC
Same problem here on RHEL 7.
I installed dnf-0:0.6.4-2.el7.noarch to get used to it (I use fedora on my personal machines).

When using dnf instead of yum, includepkgs (or include) statements in repo files get ignored.

Any news ?

Comment 24 Remi Collet 2016-01-05 14:36:21 UTC
I don't understand why this is marked as "rfe" so with low priority.

IMHO, this is a major "regression" / lack of feature compared to yum.

Comment 25 Orsiris de Jong 2016-01-05 15:52:26 UTC
Just tried the same on my local F23 box...
Using dnf-1.1.5-1.fc23.noarch produces the same unexpected behavior as described.

Do we need to declare this bug upstream ?
Also, this bug is declared for F22 but also happens on F23, does a new bugreport need to be filled or does this one need an update?

Comment 26 Amit Caleechurn 2016-06-16 16:19:05 UTC
Same issue with dnf-yum-1.1.9-2.fc24.noarch

Are there any plans to fix this issue?

Comment 27 Amit Caleechurn 2016-06-16 16:22:26 UTC
(In reply to Amit Caleechurn from comment #26)
> Same issue with dnf-yum-1.1.9-2.fc24.noarch
> Are there any plans to fix this issue?

Sorry should read dnf-1.1.9-2.fc24.noarch

Comment 28 Michael Mráka 2016-06-17 07:38:21 UTC
> Are there any plans to fix this issue?

Sure, we're working to have it fixed in dnf 2.0 release (sometime this summer).

Comment 29 Michael Mráka 2016-06-21 12:52:38 UTC
Fixed in

Comment 30 Igor Gnatenko 2016-07-21 15:01:50 UTC
Fixed in DNF 2.0.

Comment 31 nicolas.vieville 2017-07-12 17:47:34 UTC

As Fedora 26 was release this Tuesday embedding dnf 2.0, I can confirm that, once the upgrade done (with the previous version of dnf for f25), the undesired packages installed while the upgrade process can be removed with the brand new dnf 2.0 using "dnf distro-sync" without modifying any repo file. The includepkgs directives are now interpreted correctly by dnf.

Thank you for this. Automated scripts using yum-deprecated can be converted to dnf now.



Note You need to log in before you can comment on or make changes to this bug.