Bug 1253825

Summary: dnf --exclude doesn't work with distro-sync
Product: [Fedora] Fedora Reporter: Timur Kristóf <timur.kristof>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, jzeleny, mluscon, packaging-team-maint, pnemade, s, tim.lauridsen, timur.kristof, travneff, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-13 14:14:58 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:
Attachments:
Description Flags
debugdata none

Description Timur Kristóf 2015-08-14 19:44:59 UTC
Description of problem:
The --exclude or -x option doesn't work with the dnf distro-sync command.

Version-Release number of selected component (if applicable):
dnf-1.0.2-3.fc22.noarch

How reproducible:
Always.

Precondition:
Have a package installed that isn't from the Fedora repo. For example, skype.

Steps to Reproduce:
1. Open a root terminal
2. Run 'dnf distro-sync -x skype'

Actual results:
dnf wants to remove skype, even though I excluded it with the -x option.

Expected results:
dnf shouldn't touch skype, because I excluded it with the -x option.

Comment 1 Honza Silhan 2015-08-31 11:41:48 UTC
attach debugdata [1], please

[1] https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting#dependency-resolution-problem

Comment 2 Timur Kristóf 2015-09-01 11:43:36 UTC
I could not reproduce the issue with dnf-1.1.0-2.fc22.noarch ― maybe it has been fixed?

Comment 3 Andrew 2015-09-29 16:03:29 UTC
Created attachment 1078419 [details]
debugdata

Seems reproducing for me.

# dnf --assumeno --debugsolver -C --releasever=23 distro-sync --enablerepo=rpmfusion-free-rawhide --enablerepo=rpmfusion-nonfree-rawhide --disablerepo=*-updates --disablerepo rpmfusion-free --disablerepo rpmfusion-nonfree -x TeighaFileConverter | grep -B2 TeighaFileConverter 
---> Package trousers.x86_64 0.3.13-5.fc23 will be an upgrade
---> Package OpenIPMI-modalias.x86_64 2.0.21-6.fc22 will be erased
---> Package TeighaFileConverter.x86_64 4.01.0.0-1 will be erased
--
Removing:
 OpenIPMI-modalias              x86_64 2.0.21-6.fc22              @System 210  
 TeighaFileConverter            x86_64 4.01.0.0-1                 @System  78 M
Operation aborted.

Same for other packages, same for dnf-3.

debugdata attached

# rpm -qa \*dnf\* hawkey libsolv
dnf-plugins-core-0.1.11-1.fc22.noarch
hawkey-0.6.0-1.fc22.x86_64
dnf-yum-1.1.1-2.fc22.noarch
dnf-conf-1.1.1-2.fc22.noarch
python-dnf-plugins-core-0.1.11-1.fc22.noarch
dnf-1.1.1-2.fc22.noarch
libsolv-0.6.11-2.fc22.x86_64
python-dnf-1.1.1-2.fc22.noarch
python-dnf-plugins-extras-common-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-migrate-0.0.9-1.fc22.noarch
python3-dnf-1.1.1-2.fc22.noarch
python3-dnf-plugins-core-0.1.11-1.fc22.noarch

# cat /etc/dnf/dnf.conf 
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=true
best=false
deltarpm=true
debuglevel=3
keepcache=true

Comment 4 Serge Matveenko 2015-10-12 12:54:31 UTC
It looks like this reproduces when installonly packages exceeding installonly_limit. As long as the old kernel packages are marked  for removal so are an excluded packages.

Comment 5 Honza Silhan 2015-10-13 14:14:58 UTC

*** This bug has been marked as a duplicate of bug 1244175 ***