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 1603167 - Exclude in repo file does not work with dnf-3.0
Summary: Exclude in repo file does not work with dnf-3.0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Jaroslav Rohel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-19 11:07 UTC by Lukas Slebodnik
Modified: 2018-08-14 12:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-14 12:23:48 UTC


Attachments (Terms of Use)

Description Lukas Slebodnik 2018-07-19 11:07:28 UTC
Description of problem:
I added exclude to fedora-rawhide.repo to filter out some problematic packages which I would prefer to have in older version from different repository.
But upgrade to dnf-3.0 broke that

Version-Release number of selected component (if applicable):
sh$ rpm -q dnf
dnf-3.0.3-2.fc29.noarch

How reproducible:
Deterministic

Steps to Reproduce:
//ideal to reproduce in docker container
1. rpm -q dnf
2. sed -e '/^\[rawhide\]/a exclude=kernel*' -i /etc/yum.repos.d/fedora-rawhide.repo
3. dnf install -e1 -d1 kernel

Actual results:
[root@f6b7a25cb123 /]# dnf install -e1 -d1 kernel                                                                                                                                          
Last metadata expiration check: 0:00:15 ago on Thu Jul 19 10:58:51 2018.                                                                                                                   
No match for argument: kernel                                                                                                                                                              
Error: Unable to find a match                                                                                                                                                              
[root@f6b7a25cb123 /]# dnf update -y -e0 -d0 dnf gdbm                                                                                                                                      
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
System has not been booted with systemd as init system (PID 1). Can't operate.
[root@f6b7a25cb123 /]# 
[root@f6b7a25cb123 /]# rpm -q dnf
dnf-3.0.3-2.fc29.noarch
[root@f6b7a25cb123 /]# dnf install -e1 -d1 kernel
Last metadata expiration check: 0:02:28 ago on Thu Jul 19 10:58:51 2018.
Dependencies resolved.
================================================================================
 Package             Arch     Version                           Repository
                                                                           Size
================================================================================
Installing:
 kernel              x86_64   4.18.0-0.rc4.git4.1.fc29          rawhide    50 k
Upgrading:
 systemd             x86_64   239-2.fc29                        rawhide   3.6 M
 systemd-libs        x86_64   239-2.fc29                        rawhide   523 k
 systemd-pam         x86_64   239-2.fc29                        rawhide   211 k
 xz-libs             x86_64   5.2.4-2.fc29                      rawhide    89 k
Installing dependencies:
 cpio                x86_64   2.12-8.fc29                       rawhide   264 k
 dracut              x86_64   048-1.fc29                        rawhide   315 k
 findutils           x86_64   1:4.6.0-19.fc29                   rawhide   518 k
 initscripts         x86_64   10.00-1.fc29                      rawhide   335 k
 kbd-legacy          noarch   2.0.4-5.fc28                      rawhide   480 k
 kbd-misc            noarch   2.0.4-5.fc28                      rawhide   1.4 M
 kernel-core         x86_64   4.18.0-0.rc4.git4.1.fc29          rawhide    26 M
 kernel-modules      x86_64   4.18.0-0.rc4.git4.1.fc29          rawhide    29 M
 kmod                x86_64   25-2.fc28                         rawhide   116 k
 libkcapi            x86_64   1.1.1-4.fc29                      rawhide    43 k
 libkcapi-hmaccalc   x86_64   1.1.1-4.fc29                      rawhide    26 k
 linux-firmware      noarch   20180525-85.git7518922b.fc29      rawhide    65 M
 procps-ng           x86_64   3.3.15-3.fc29                     rawhide   320 k
 systemd-udev        x86_64   239-2.fc29                        rawhide   1.3 M
 xkeyboard-config    noarch   2.24-3.fc29                       rawhide   822 k
 xz                  x86_64   5.2.4-2.fc29                      rawhide   148 k
Installing weak dependencies:
 hardlink            x86_64   1:1.3-6.fc28                      rawhide    28 k
 kbd                 x86_64   2.0.4-5.fc28                      rawhide   387 k
 kpartx              x86_64   0.7.7-2.fc29                      rawhide    55 k
 libxkbcommon        x86_64   0.8.0-3.fc29                      rawhide   115 k
 pigz                x86_64   2.4-2.fc28                        rawhide    77 k
 systemd-bootchart   x86_64   233-2.fc29                        rawhide    69 k

Transaction Summary
================================================================================
Install  23 Packages
Upgrade   4 Packages

Total download size: 131 M
Is this ok [y/N]: N

Expected results:
[root@f6b7a25cb123 /]# rpm -q dnf
dnf-3.0.3-2.fc29.noarch
[root@f6b7a25cb123 /]# dnf install -e1 -d1 kernel
Last metadata expiration check: 0:00:15 ago on Thu Jul 19 10:58:51 2018.
No match for argument: kernel
Error: Unable to find a match


Additional info:
Full example in rawhide container
sh# docker run -ti --rm docker.io/fedora:rawhide bash                                                                                                                   

[root@f6b7a25cb123 /]# sed -e '/^\[rawhide\]/a exclude=kernel*' -i /etc/yum.repo                                                                                                           s.d/fedora-rawhide.repo                                                                                                                                                     

[root@f6b7a25cb123 /]# rpm -q dnf                                                                                                                                                          
dnf-2.7.5-8.fc28.noarch                                                                                                                                                     
[root@f6b7a25cb123 /]# dnf install -e1 -d1 kernel                                                                                                                                          
Last metadata expiration check: 0:00:15 ago on Thu Jul 19 10:58:51 2018.                                                                                                                   
No match for argument: kernel                                                                                                                                                              
Error: Unable to find a match                                                                                                                                                              

[root@f6b7a25cb123 /]# dnf update -y -e0 -d0 dnf gdbm                                                                                                                                      
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
System has not been booted with systemd as init system (PID 1). Can't operate.
[root@f6b7a25cb123 /]# 

[root@f6b7a25cb123 /]# rpm -q dnf
dnf-3.0.3-2.fc29.noarch
[root@f6b7a25cb123 /]# dnf install -e1 -d1 kernel
Last metadata expiration check: 0:02:28 ago on Thu Jul 19 10:58:51 2018.
Dependencies resolved.
================================================================================
 Package             Arch     Version                           Repository
                                                                           Size
================================================================================
Installing:
 kernel              x86_64   4.18.0-0.rc4.git4.1.fc29          rawhide    50 k
Upgrading:
 systemd             x86_64   239-2.fc29                        rawhide   3.6 M
 systemd-libs        x86_64   239-2.fc29                        rawhide   523 k
 systemd-pam         x86_64   239-2.fc29                        rawhide   211 k
 xz-libs             x86_64   5.2.4-2.fc29                      rawhide    89 k
Installing dependencies:
 cpio                x86_64   2.12-8.fc29                       rawhide   264 k
 dracut              x86_64   048-1.fc29                        rawhide   315 k
 findutils           x86_64   1:4.6.0-19.fc29                   rawhide   518 k
 initscripts         x86_64   10.00-1.fc29                      rawhide   335 k
 kbd-legacy          noarch   2.0.4-5.fc28                      rawhide   480 k
 kbd-misc            noarch   2.0.4-5.fc28                      rawhide   1.4 M
 kernel-core         x86_64   4.18.0-0.rc4.git4.1.fc29          rawhide    26 M
 kernel-modules      x86_64   4.18.0-0.rc4.git4.1.fc29          rawhide    29 M
 kmod                x86_64   25-2.fc28                         rawhide   116 k
 libkcapi            x86_64   1.1.1-4.fc29                      rawhide    43 k
 libkcapi-hmaccalc   x86_64   1.1.1-4.fc29                      rawhide    26 k
 linux-firmware      noarch   20180525-85.git7518922b.fc29      rawhide    65 M
 procps-ng           x86_64   3.3.15-3.fc29                     rawhide   320 k
 systemd-udev        x86_64   239-2.fc29                        rawhide   1.3 M
 xkeyboard-config    noarch   2.24-3.fc29                       rawhide   822 k
 xz                  x86_64   5.2.4-2.fc29                      rawhide   148 k
Installing weak dependencies:
 hardlink            x86_64   1:1.3-6.fc28                      rawhide    28 k
 kbd                 x86_64   2.0.4-5.fc28                      rawhide   387 k
 kpartx              x86_64   0.7.7-2.fc29                      rawhide    55 k
 libxkbcommon        x86_64   0.8.0-3.fc29                      rawhide   115 k
 pigz                x86_64   2.4-2.fc28                        rawhide    77 k
 systemd-bootchart   x86_64   233-2.fc29                        rawhide    69 k

Transaction Summary
================================================================================
Install  23 Packages
Upgrade   4 Packages

Total download size: 131 M
Is this ok [y/N]: N

Comment 1 Martin Hatina 2018-07-26 08:17:22 UTC
Try using 'excludepkgs' for now. We will try to fix 'exclude' option (which is alias for 'excludepkgs').

Comment 2 Lukas Slebodnik 2018-07-26 08:44:22 UTC
(In reply to Martin Hatina from comment #1)
> Try using 'excludepkgs' for now. We will try to fix 'exclude' option (which
> is alias for 'excludepkgs').

That works. Thank you very much for workaround.

Comment 3 Jan Kurik 2018-08-14 10:28:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 4 Jaroslav Rohel 2018-08-14 12:23:48 UTC
Aliases for options were fixed in DNF 3.1.0.
("exclude" is alias for "excludepkgs")


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