Description of problem:
dnf doesn't filter correctly includepkgs directive from repositories configuration files.
Version-Release number of selected component (if applicable):
Add an includepkgs=package_name in a repository configuration file and dnf upgrade.
Steps to Reproduce:
1. Added adobe-linux-x86_64 repository
2. Installed flash-plugin from adobe-linux-x86_64 repository
3. Added russianfedora-nonfree-updates repository
4. Added includepkgs=skype russianfedora-nonfree-release to /etc/yum.repos.d/russianfedora-nonfree.repo configuration file
5. Tried "dnf upgrade --refresh"
Upgrades flash-plugin from adobe-linux-x86_64 with russianfedora-nonfree-updates one despite the includepkgs directive not listing it.
Don't upgrade flash-plugin installed from adobe-linux-x86_64 repository with the one from russianfedora-nonfree-updates repository because of the directive includepkgs added in russianfedora-nonfree-updates repository configuration file doesn't contain "flash-plugin".
Filtering packages through includepkgs and exclude directives was working correctly with previous version of dnf (2.7.4-1).
Please could you provide outputs from dnf-2.7.4 and dnf-2.7.5 with the same setting for command "dnf upgrade -v"? DNF-2.7.4 is easily available from copr repository (dnf copr enable rpmsoftwaremanagement/dnf-nightly).
Please also *.repo files from /etc/yum.repos.d/ and /etc/dnf/dnf.conf could help.
Thanks a lot
Created attachment 1342187 [details]
Created attachment 1342188 [details]
Created attachment 1342189 [details]
Created attachment 1342190 [details]
Created attachment 1342191 [details]
Created attachment 1342192 [details]
Created attachment 1342193 [details]
Created attachment 1342194 [details]
Created attachment 1342195 [details]
Created attachment 1342196 [details]
Created attachment 1342197 [details]
Created attachment 1342198 [details]
Created attachment 1342199 [details]
Created attachment 1342200 [details]
Created attachment 1342201 [details]
Created attachment 1342202 [details]
Created attachment 1342203 [details]
Created attachment 1342204 [details]
Created attachment 1342205 [details]
Created attachment 1342206 [details]
Created attachment 1342207 [details]
Created attachment 1342208 [details]
Here are the outputs and files you asked for.
The outputs were obtained by adding the "--exclude=dnf,dnf-conf,dnf-yum,python2-dnf,python3-dnf" option to each command in order to avoid upgrading/playing_with dnf.
Hope this will be what you asked for.
Please don't hesitate to comment about this subject.
Thanks a lot. Probably I have the issue. Please can you perform following:
I believe that "russianfedora-nonfree-release", or "skype" is not present at all in "russianfedora-nonfree-nico-updates".
Please remove include from "russianfedora-nonfree-nico-updates" repo file and run "dnf repoquery -repo russianfedora-nonfree-nico-updates skype russianfedora-nonfree-release". If it returns nothing, it is the issue.
Thanks for additional information.
Removed the includepkgs directive from "russianfedora-nonfree-nico-updates" repo and from "russianfedora-nonfree-nico" repo.
#LANG=C dnf repoquery --repo russianfedora-nonfree-nico-updates skype russianfedora-nonfree-release
Last metadata expiration check: 0:03:36 ago on Mon Oct 23 16:20:13 2017.
#LANG=C dnf repoquery --repo russianfedora-nonfree-nico skype russianfedora-nonfree-release
Last metadata expiration check: 0:03:55 ago on Mon Oct 23 16:20:51 2017.
Repository "russianfedora-nonfree-nico-updates" gives nothing unless "Last metadata expiration check".
Repository "russianfedora-nonfree-nico" gives "Last metadata expiration check" and print the names of the two packages queried.
The includepkgs directive have to be set in the two repositories configuration files in order be able to install and get the possible updates for the concerned packages. For the moment, none of these packages have been updated, conducting to an empty list from the "russianfedora-nonfree-nico-updates" repository.
Hope this helps.
Feel free to make any comments about this subject.
I created a patch that should solve the issue (https://github.com/rpm-software-management/dnf/pull/967)
Testing the patch from #27 applied on a fresh update of dnf to 2.7.5-1 on fedora 26.
With the same configuration files for repositories as above, dnf now works correctly with includepkgs directive and doesn't wants to upgrade flash-plugin from adobe with the one from russianfedora anymore. Well done.
Hope this patch will be applied on next dnf update for fedora.
Do you think this fix https://github.com/rpm-software-management/dnf/commit/094e0659a9db45871dc1f6379e6b3b1ed5b3c077 will be included in next release of Fedora python3-dnf and python2-dnf packages in order to make packages upgrade take care of includepkgs directive?
The fix have been pushed in the github repository, but have not reached the Fedora packages.
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Sorry for re-opening this bug report, but with Fedora 28 and last dnf available (dnf-2.7.5-12.fc28.noarch), this bug re-appeared with exactly the same symptoms as my first post (flash-plugin from russian repository replace one from adobe repository).
After applying the same patch as post #29 link to base.py, the issue seems to be fixed (dnf distro-sync and dnf --refresh upgrade fix the problem).
Do you think it will be possible to definitively apply the patch to the next fedora dnf packages, in order to not being surprised with future unattended package upgrades.
Thanks in advance. Any comment about this subject are welcome.
The patch should be part of dnf-3.0 that is planned to be released in about 30 days into rawhide and Fedora 28.
Thank you for this information I wasn't aware of. Sorry for the noise, I'll wait for this new release with great interest.
The issue is solved by dnf-3.0.1-1 that was released into rawhide.