Bug 916662 - dnf remove wants to install new packages
Summary: dnf remove wants to install new packages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 871892
TreeView+ depends on / blocked
 
Reported: 2013-02-28 15:58 UTC by Rahul Sundaram
Modified: 2014-09-30 23:41 UTC (History)
3 users (show)

Fixed In Version: hawkey-0.3.13-2.git15db39f.fc19
Clone Of:
Environment:
Last Closed: 2013-06-07 04:38:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rahul Sundaram 2013-02-28 15:58:17 UTC
Description of problem:

sudo dnf remove j*-devel
Setting up Remove Process
Resolving Dependencies
--> Starting dependency resolution
--> Finding unneeded leftover dependencies
---> Package java-1.5.0-gcj-devel.x86_64 1.5.0.0-40.fc18 will be installed
---> Package java-1.5.0-gcj.x86_64 1.5.0.0-40.fc18 will be installed
---> Package sinjdoc.x86_64 0.5-13.fc18 will be installed
---> Package libgcj.x86_64 4.7.2-8.fc18 will be installed
---> Package gcc-java.x86_64 4.7.2-8.fc18 will be installed
---> Package libgcj-src.x86_64 4.7.2-8.fc18 will be installed
---> Package ecj.x86_64 1:4.2.1-4.fc18 will be installed
---> Package gcc.x86_64 4.7.2-8.fc18 will be installed
---> Package glibc-devel.x86_64 2.16-28.fc18 will be installed
---> Package libgcj-devel.x86_64 4.7.2-8.fc18 will be installed
---> Package zlib-devel.x86_64 1.2.7-9.fc18 will be installed
---> Package jack-audio-connection-kit-devel.x86_64 1.9.9.5-1.fc18 will be erased
---> Package java-1.7.0-openjdk-devel.x86_64 1:1.7.0.9-2.3.7.0.fc18 will be erased
--> Finished dependency resolution

Dependencies Resolved

================================================================================
 Package                         Arch   Version                   Repository
                                                                           Size
================================================================================
Installing:
 ecj                             x86_64 1:4.2.1-4.fc18            updates 1.5 M
 gcc                             x86_64 4.7.2-8.fc18              fedora   14 M
 gcc-java                        x86_64 4.7.2-8.fc18              fedora  4.8 M
 glibc-devel                     x86_64 2.16-28.fc18              updates 996 k
 java-1.5.0-gcj                  x86_64 1.5.0.0-40.fc18           fedora  151 k
 java-1.5.0-gcj-devel            x86_64 1.5.0.0-40.fc18           fedora   46 k
 libgcj                          x86_64 4.7.2-8.fc18              fedora   18 M
 libgcj-devel                    x86_64 4.7.2-8.fc18              fedora  1.5 M
 libgcj-src                      x86_64 4.7.2-8.fc18              fedora   12 M
 sinjdoc                         x86_64 0.5-13.fc18               fedora  707 k
 zlib-devel                      x86_64 1.2.7-9.fc18              fedora   49 k
Removing:
 jack-audio-connection-kit-devel x86_64 1.9.9.5-1.fc18            @System   0  
 java-1.7.0-openjdk-devel        x86_64 1:1.7.0.9-2.3.7.0.fc18    @System   0  

Transaction Summary
================================================================================
Install  11 Packages
Remove    2 Packages

Total download size: 54 M
Is this ok [y/N]: y
Downloading Packages:
(1/11): zlib-devel-1.2.7-9.fc18.x86_64.rpm               |  49 kB     00:00     
(2/11): gcc-4.7.2-8.fc18.x86_64.rpm                      |  14 MB     00:12     
(3/11): libgcj-src-4.7.2-8.fc18.x86_64.rpm               |  12 MB     00:10     
(4/11): ecj-4.2.1-4.fc18.x86_64.rpm                      | 1.5 MB     00:
<manually stopped>

Comment 1 Ales Kozumplik 2013-03-01 10:05:42 UTC
run 'rpm -e jack-audio-connection-kit-devel java-1.7.0-openjdk-devel' and paste the output.

Comment 2 Ales Kozumplik 2013-03-01 12:06:30 UTC
An example Fedora 18 reproducer:

dnf install ant
dnf remove java-1.5.0-gcj-devel

Then dnf tries to remove java but keep ant installed by supplying java-devel from another runtime. Hawkey is probably missing to set a libsolv flag somewhere.

Comment 3 Ales Kozumplik 2013-03-01 12:24:01 UTC
Michael,

given the following:

@System:
=Pkg: l 1 1 noarch
=Pkg: a 1 1 noarch
=Req: l

main:
=Pkg: l2 1 1 noarch
=Prv: l

Is there a way to tell libsolv not to install 'l2' (or anything else, something like SOLVER_FLAG_NO_INSTALL) when we tell it to remove 'a' with SOLVER_FLAG_ALLOW_UNINSTALL ? (not that I'm defending usefulness of such behavior, but that's how yum operates).

Thank you,
Ales

Comment 4 Michael Schröder 2013-03-01 12:30:00 UTC
There's no general way. It's kind of intrinsic to the sat algorithm to use alternatives for dependencies.

Having said that, there's an easy way to do it for "non mixed-mode" operations, i.e. if you know that you only deinstall packages: let the solver only work with the "installed" repo and no other repo. That way, it can only deinstall packages.

Comment 5 Ales Kozumplik 2013-03-01 12:32:54 UTC
(In reply to comment #4)
> Having said that, there's an easy way to do it for "non mixed-mode"
> operations, i.e. if you know that you only deinstall packages: let the
> solver only work with the "installed" repo and no other repo. That way, it
> can only deinstall packages.

Thank you! Also this will prevent metadata sync for the remove operation.

Comment 6 Fedora End Of Life 2013-04-03 19:11:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 7 Ales Kozumplik 2013-05-16 11:22:12 UTC
not working on this, waiting for a generic mechanism in DNF to achieve what comment 4 is suggesting in a systematic way.

Comment 8 Ales Kozumplik 2013-05-28 13:23:45 UTC
Fixed by 78fe567, will be included in dnf-0.3.7.

Comment 9 Fedora Update System 2013-05-29 12:54:01 UTC
hawkey-0.3.13-2.git15db39f.fc19, dnf-0.3.7-1.gitf8bdc98.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/FEDORA-2013-9385/hawkey-0.3.13-2.git15db39f.fc19,dnf-0.3.7-1.gitf8bdc98.fc19

Comment 10 Fedora Update System 2013-05-29 17:49:26 UTC
Package hawkey-0.3.13-2.git15db39f.fc19, dnf-0.3.7-1.gitf8bdc98.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hawkey-0.3.13-2.git15db39f.fc19 dnf-0.3.7-1.gitf8bdc98.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9385/hawkey-0.3.13-2.git15db39f.fc19,dnf-0.3.7-1.gitf8bdc98.fc19
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2013-06-07 04:38:40 UTC
hawkey-0.3.13-2.git15db39f.fc19, dnf-0.3.7-1.gitf8bdc98.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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