Bug 1468426

Summary: dnf ignores exclusions of packages from *.repo files
Product: [Fedora] Fedora Reporter: dsalazar23491
Component: dnfAssignee: Jaroslav Rohel <jrohel>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 25CC: jrohel, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-11 05:47:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dsalazar23491 2017-07-07 04:22:27 UTC
Description of problem:
dnf ignores "exclude=" string at the end of *.repo files inside /etc/yum.repos.d


Version-Release number of selected component (if applicable):
dnf-1.1.10-6.fc25.noarch
rpm-4.13.0.1-1.fc25.i686

How reproducible:
I included rpmfusion-free repository in my list. The last version of VLC in that repository (3.0.0-0.28.git20170622.fc25) has some conflicts with wayland, hence the desirable behavior is updating that package only from Fedora official repositories (currently vlc-3.0.0-0.9.fc25.i686). Appending 

'exclude=vlc* vlc-core* vlc-extras*' 

at the end of '/etc/yum.repos.d/rpmfusion-free-updates.repo' does nothing, since '# dnf update' retrieves this

================================================================================ Package      Arch  Version                        Repository              Size
================================================================================
Updating:    
 vlc         i686  3.0.0-0.28.git20170622.fc25    rpmfusion-free-updates  2.0 M
 vlc-core    i686  3.0.0-0.28.git20170622.fc25    rpmfusion-free-updates  7.9 M
 vlc-extras  i686  3.0.0-0.28.git20170622.fc25    rpmfusion-free-updates   69 k

Transaction Summary
================================================================================
Update  3 Packages

Steps to Reproduce:
1. Go to /etc/yum.repos.d
2. Append a 'exclude=package1 package2...' string at the .repo file of a repository.
3. #dnf update

Actual results:
Getting package updates from undesired repositories.

Expected results:
Don't get updates for packages from undesired repositories.

Additional info:
Probably useless but this distribution (Fedora 25 Workstation 32 bits) was fresh-installed just a week ago.

Comment 1 Jaroslav Rohel 2017-07-10 13:07:39 UTC
I tested it on fresh Fedora 25 as the reporter. Option "exclude" worked without problem.

What you mean by "Appending at the and of '/etc/yum.repos.d/rpmfusion-free-updates.repo'"?
Append it to the end of appropriate section not to the end of file.


My functional rpmfusion-free-updates.repo file:

[rpmfusion-free-updates]
name=RPM Fusion for Fedora $releasever - Free - Updates
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-updates-released-$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
exclude=vlc* vlc-core* vlc-extras*

[rpmfusion-free-updates-debuginfo]
name=RPM Fusion for Fedora $releasever - Free - Updates Debug
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/debug/
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-updates-released-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever

[rpmfusion-free-updates-source]
name=RPM Fusion for Fedora $releasever - Free - Updates Source
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/SRPMS/
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-updates-released-source-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever

Comment 2 Jaroslav Rohel 2017-07-11 05:47:11 UTC
I can't reproduce the problem.
As I wrote in first comment. Append "exclude" option to the appropriate section not to the end of file.