Bug 1227053

Summary: '--exclude' option empties whole transaction
Product: [Fedora] Fedora Reporter: Enrico Scholz <rh-bugzilla>
Component: dnfAssignee: Michael Mráka <mmraka>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 23CC: ignatenko, jsilhan, jzeleny, mluscon, mmraka, packaging-team-maint, pnemade, rh-bugzilla, tim.lauridsen, vmukhame
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-29 14:55:49 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
dnf upgrade --exclude XXXXXX -d10
none
dnf upgrade -d10
none
dnf upgrade --exclude XXXXXX --debugsolver none

Description Enrico Scholz 2015-06-01 20:28:46 UTC
Description of problem:

When '--exclude' is used to exclude a single package during 'upgrade', the whole transaction is empty although there are other, not excluded packages are available.


# dnf upgrade --exclude XXXXXX 
...
Dependencies resolved.
Nothing to do.
Complete!


# dnf upgrade
...
Dependencies resolved.
...
Install   3 Packages
Upgrade  21 Packages
Remove    3 Packages

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


# yum-deprecated upgrade --exclude fontconfig
...
Dependencies Resolved
...
Install   5 Packages
Upgrade  19 Packages
Remove    4 Packages

Total size: 55 M
Total download size: 54 M
Is this ok [y/d/N]: 


Version-Release number of selected component (if applicable):

dnf-1.0.0-1.fc22.noarch


How reproducible:

100%

Comment 1 Honza Silhan 2015-07-24 09:49:15 UTC
Can you share the exacts outputs (+ output of command without exclude option set) and attach the debugdata of dnf [1], please?

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

Comment 2 Fedora Admin XMLRPC Client 2016-07-08 09:33:42 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora End Of Life 2016-07-19 14:27:32 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 4 Enrico Scholz 2016-07-19 18:30:18 UTC
still with dnf-1.1.9-2.fc23.noarch

Comment 5 Enrico Scholz 2016-07-19 18:31:25 UTC
Created attachment 1181763 [details]
dnf upgrade --exclude XXXXXX -d10

Comment 6 Enrico Scholz 2016-07-19 18:35:23 UTC
Created attachment 1181765 [details]
dnf upgrade  -d10

Comment 7 Enrico Scholz 2016-07-19 18:37:48 UTC
Created attachment 1181768 [details]
dnf upgrade --exclude XXXXXX --debugsolver

Comment 8 Michael Mráka 2016-07-20 09:36:38 UTC
There must be something in your configuration which triggers this bug because I can't reproduce it on fresh system:

#  dnf upgrade 
...
Transaction Summary
==========================================================================================================
Install   3 Packages
Upgrade  65 Packages
Remove    3 Packages

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

#  dnf upgrade --exclude XXX
...
Transaction Summary
==========================================================================================================
Install   3 Packages
Upgrade  65 Packages
Remove    3 Packages

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

# rpm -q dnf
dnf-1.1.9-2.fc23.noarch


Could you attach your repo configuration?
(e.g. output of dnf config-manager --dump \*)

Comment 9 Enrico Scholz 2016-07-25 11:18:11 UTC
it seems to be triggered by adding something like

| include=file:///etc/yum.repos.d/EXCLUDES-base

to a repository section (e.g. to [fedora] in /etc/yum.repos.d/fedora.repo).

Comment 10 Michael Mráka 2016-07-26 09:36:00 UTC
Three notes here:
- include means something different in dnf v1; you want to use
  includeconf=file:///etc/yum.repos.d/EXCLUDES-base
- even then there're bugs in include/exclude which has been fixed in dnf v2
  (bug 1055910, bug 1219867)
- and even then there was a bug in including config files, fixed now in
  https://github.com/rpm-software-management/dnf/pull/546

Comment 11 Igor Gnatenko 2016-07-29 14:55:49 UTC
Merged as part of DNF 2.0 release.