Bug 947258 - dnf doesn't erase excluded packages
dnf doesn't erase excluded packages
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
18
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-01 20:18 EDT by Cristian Ciupitu
Modified: 2014-09-30 19:41 EDT (History)
2 users (show)

See Also:
Fixed In Version: dnf-0.3.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-03 09:42:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
cobbler-2.3.1-1.fc18.noarch.rpm (595.82 KB, application/x-rpm)
2013-04-02 07:04 EDT, Cristian Ciupitu
no flags Details
koan-2.3.1-1.fc18.noarch.rpm (176.57 KB, application/x-rpm)
2013-04-02 07:05 EDT, Cristian Ciupitu
no flags Details

  None (edit)
Description Cristian Ciupitu 2013-04-01 20:18:17 EDT
Description of problem:
dnf fails to erase two installed packages, while yum has no problem.

Version-Release number of selected component (if applicable):
dnf-0.2.22-1.git97180b8.fc18.noarch.rpm
hawkey-0.3.8-1.git046ab1c.fc18.x86_64.rpm

How reproducible:
Every time

Steps to Reproduce:
1. Make /etc/dnf/dnf.conf look like this:
[main]
keepcache=1
debuglevel=2
exactarch=1
obsoletes=1
gpgcheck=1
plugins=0
installonly_limit=3
multilib_policy=best
clean_requirements_on_remove=true

exclude=cobbler,koan

2. Install some locally built RPMs, cobbler and koan in my case

3. Try to erase them:
dnf erase cobbler koan
  
Actual results:
Setting up Remove Process
No Packages marked for removal

Expected results:
The packages should be removed

Additional info:
[root@hermes ~]# cat /etc/yum.conf 
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3

exclude=cobbler,koan

[root@hermes ~]# yum erase cobbler koan
Loaded plugins: auto-update-debuginfo, fastestmirror, presto, priorities,
              : protectbase
Resolving Dependencies
--> Running transaction check
---> Package cobbler.noarch 0:2.3.1-1.fc18 will be erased
---> Package koan.noarch 0:2.3.1-1.fc18 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch           Version                 Repository         Size
================================================================================
Removing:
 cobbler         noarch         2.3.1-1.fc18            installed         2.3 M
 koan            noarch         2.3.1-1.fc18            installed         378 k

Transaction Summary
================================================================================
Remove  2 Packages

Installed size: 2.7 M
Is this ok [y/N]:
Comment 1 Ales Kozumplik 2013-04-02 02:50:56 EDT
Hmmm, odd. Can you attach the two packages to thiz bugzilla please?

You installed these two packages with 'dnf install kobbler.. .rpm coan.. .rpm', yes?
Comment 2 Cristian Ciupitu 2013-04-02 07:03:34 EDT
I might have installed those packages with yum, but I've retested everything with dnf at your request.

[root@hermes ~]# dnf install ~ciupicri/3rdparty-projects/cobbler/rpm-build/cobbler-2.3.1-1.fc18.noarch.rpm  ~ciupicri/3rdparty-projects/cobbler/rpm-build/koan-2.3.1-1.fc18.noarch.rpm 
Setting up Install Process
Resolving Dependencies
--> Starting dependency resolution
---> Package cobbler.noarch 2.3.1-1.fc18 will be installed
---> Package koan.noarch 2.3.1-1.fc18 will be installed
--> Finished dependency resolution

Dependencies Resolved

===============================================================================
 Package        Arch          Version                Repository           Size
===============================================================================
Installing:
 cobbler        noarch        2.3.1-1.fc18           @commandline        596 k
 koan           noarch        2.3.1-1.fc18           @commandline        177 k

Transaction Summary
===============================================================================
Install  2 Packages

Total size: 772 k
Installed size: 772 k
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
RPMDB altered outside of DNF.
  Installing : koan-2.3.1-1.fc18.noarch                                    1/2 
  Installing : cobbler-2.3.1-1.fc18.noarch                                 2/2 
  Verifying  : cobbler-2.3.1-1.fc18.noarch                                 1/2 
  Verifying  : koan-2.3.1-1.fc18.noarch                                    2/2 

Installed:
  cobbler.noarch 2.3.1-1.fc18             koan.noarch 2.3.1-1.fc18            

Complete!
[root@hermes ~]# dnf erase cobbler koan
Setting up Remove Process
No Packages marked for removal
Comment 3 Cristian Ciupitu 2013-04-02 07:04:42 EDT
Created attachment 730686 [details]
cobbler-2.3.1-1.fc18.noarch.rpm
Comment 4 Cristian Ciupitu 2013-04-02 07:05:13 EDT
Created attachment 730687 [details]
koan-2.3.1-1.fc18.noarch.rpm
Comment 5 Cristian Ciupitu 2013-04-02 07:28:46 EDT
If I temporary disable "exclude=cobbler,koan", dnf asks me if I want to remove those packages.
Comment 6 Ales Kozumplik 2013-04-03 09:42:50 EDT
As we found out on IRC yesterday, this is because DNF extends the semantics of excludes to all operations, erase included (unlike yum where excludes only apply to installs and upgrades). This is documented in commit c2ec957, dnf-0.3.2:

http://akozumpl.github.com/dnf/cli_vs_yum.html#excludes-and-repo-excludes-apply-to-all-operations

While at it I found out that --disableexcludes and more granular per-repo excludes don't work in DNF at all. This is addressed by commit 5cb7f5e.

Thanks again for the report.

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