Bug 2583488

Summary: exclude= line in dnf.conf should be ignored during queries
Product: [Fedora] Fedora Reporter: Felix Miata <mrmazda>
Component: dnf5Assignee: rpm-software-management
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jonathan, pkratoch, ppisar, rpm-software-management
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Felix Miata 2026-11-24 16:44:02 UTC
original summary:
exclude= line in dnf.conf should be ignored during queries

The problem:
# dnf list *kernel-core*
Updating and loading repositories:
Last metadata expiration check: 0:00:07 ago on 2026-11-24 15:56:20.
Repositories loaded.
No matches found.
# dnf -q --enablerepo=updates-archive list --showduplicates --releasever=43 kernel-7\*
No matching packages to list
# grep excl /etc/dnf/dnf.conf
exclude= ... kernel* ...
# zypper se -s kernel-core | grep -v 'debug|devel|srcp' | egrep 'x86|noarch'| wc -l
69
# zypper se -s kernel-core | grep -v 'debug|devel|srcp' | egrep 'x86|noarch'| sort | tail
v  | kernel-core | package | 7.2.14-100.fc43  | x86_64 | Fedora 43 - x86_64 - Updates Archive
v  | kernel-core | package | 7.2.4-100.fc43   | x86_64 | Fedora 43 - x86_64 - Updates Archive
v  | kernel-core | package | 7.2.5-100.fc43   | x86_64 | Fedora 43 - x86_64 - Updates Archive
v  | kernel-core | package | 7.2.7-100.fc43   | x86_64 | Fedora 43 - x86_64 - Updates Archive
v  | kernel-core | package | 7.2.8-100.fc43   | x86_64 | Fedora 43 - x86_64 - Updates Archive
v  | kernel-core | package | 7.2.9-100.fc43   | x86_64 | Fedora 43 - x86_64 - Updates Archive
v  | kernel-core | package | 7.2.9-101.fc43   | x86_64 | Fedora 43 - x86_64 - Updates Archive
v  | kernel-core | package | 7.3.3-100.fc43   | x86_64 | Fedora 43 - x86_64 - Updates Archive
v  | kernel-core | package | 7.3.4-100.fc43   | x86_64 | Fedora 43 - x86_64 - Updates
v  | kernel-core | package | 7.3.4-100.fc43   | x86_64 | Fedora 43 - x86_64 - Updates Archive

Obviously kernels exist.

cf. zypper, where locked packages are ignored for query purposes, while for install/remove/update purposes, it asks what to do when locked package is encountered, either remove lock (which translates to ignore when lock contains a wildcard), or do not install/remove/update. Further, zypper provides addlock (al)/removelock (rl) cmdline interface rather than need to edit configfile, though editing remains an option.