Bug 1179632 - DNF refuses to update Fedora 21 package with Fedora 22 package
Summary: DNF refuses to update Fedora 21 package with Fedora 22 package
Keywords:
Status: CLOSED DUPLICATE of bug 1160950
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-07 09:06 UTC by Petr Spacek
Modified: 2015-02-09 14:28 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-01-15 16:26:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Spacek 2015-01-07 09:06:03 UTC
Description of problem:
DNF refuses to update Fedora 21 package with Fedora 22 package, please see the example below.

Version-Release number of selected component (if applicable):
dnf-0.6.3-2.fc21.noarch

How reproducible:
100 %

Steps to Reproduce:
1. install package dunst-1.0.0-5.fc21.x86_64 to Fedora 21 box
2. attempt to install package dunst-1.1.0-2.fc22.x86_64.rpm using Koji HTTPS URL

Actual results:
$ rpm -q dunst
dunst-1.0.0-5.fc21.x86_64

$ sudo dnf install https://kojipkgs.fedoraproject.org//work/tasks/5745/8545745/dunst-1.1.0-2.fc22.x86_64.rpm
Package dunst-1.0.0-5.fc21.x86_64 is already installed, skipping.
Error: Nothing to do.

$ sudo dnf reinstall https://kojipkgs.fedoraproject.org//work/tasks/5745/8545745/dunst-1.1.0-2.fc22.x86_64.rpm
Package dunst-1.1.0-2.fc22.x86_64 not installed, cannot reinstall it.
Error: Nothing to do.

$ wget -q https://kojipkgs.fedoraproject.org//work/tasks/5745/8545745/dunst-1.1.0-2.fc22.x86_64.rpm
$ sudo rpm -U dunst-1.1.0-2.fc22.x86_64.rpm 
$ rpm -q dunst
dunst-1.1.0-2.fc22.x86_64

Expected results:
DNF should install the package. RPM updated the package without any complaint so it seems that there is not dependency problem.

Comment 1 Petr Spacek 2015-01-07 12:02:49 UTC
The same problem appears the other way around too:

$ rpm -q dunst
dunst-1.1.0-2.fc22.x86_64

$ dnf install https://kojipkgs.fedoraproject.org//packages/dunst/1.1.0/2.fc21/x86_64/dunst-1.1.0-2.fc21.x86_64.rpm
Package dunst-1.1.0-2.fc22.x86_64 is already installed, skipping.
Error: Nothing to do.

$ dnf reinstall https://kojipkgs.fedoraproject.org//packages/dunst/1.1.0/2.fc21/x86_64/dunst-1.1.0-2.fc21.x86_64.rpm
Package dunst-1.1.0-2.fc21.x86_64 not installed, cannot reinstall it.
Error: Nothing to do.

$ sudo rpm -U --oldpackage https://kojipkgs.fedoraproject.org//packages/dunst/1.1.0/2.fc21/x86_64/dunst-1.1.0-2.fc21.x86_64.rpm

$ rpm -q dunst
dunst-1.1.0-2.fc21.x86_64

Comment 2 Jan Zeleny 2015-01-07 13:03:50 UTC
This is well known behavior of dnf that has been discussed for some time. The thing is that from the perspective of dnf, you are not trying to update the package, you are in fact trying to install different version of the package. It's as if you you used rpm -i instead of rpm -U.

Comment 3 Petr Spacek 2015-01-07 14:31:10 UTC
Okay then. It seems that dnf upgrade is able to do the trick but IMHO it is really unexpected behavior.

Please improve the error message if you really need to keep current behavior. (It could suggest to use 'upgrade' instead of 'install'.) Thank you!

Comment 4 Jan Zeleny 2015-01-07 15:27:42 UTC
*** Bug 1179720 has been marked as a duplicate of this bug. ***

Comment 5 Radek Holy 2015-01-07 16:15:40 UTC
Hello, just out of curiosity - I'm interested in your point of view because we can argue that "dnf install" *can* fail because it cannot *just install* given package because a conflicting package is already installed. However it seems this perspective is in minority and I'm interested the other perspectives.

Why did you execute "dnf install" while you actually meant "dnf upgrade"? It's just that you didn't know that an older version is installed? Or that you don't care, you just want to have the package *installed*. Or just that it worked in YUM and you are used to it? Or do you expect different behaviour when you type just package names and when you type a full URL? Please help me to understand your expectations. It would be very valuable.

Comment 6 Neal Becker 2015-01-07 18:24:33 UTC
1. I did dnf install because that's what I'm used to with yum

2. I did install because upgrade means remove the old kernel, which is not what I wanted.  I wanted to keep both installed.

Comment 7 Petr Spacek 2015-01-08 09:40:30 UTC
(In reply to Radek Holy from comment #5)
> Why did you execute "dnf install" while you actually meant "dnf upgrade"?
> It's just that you didn't know that an older version is installed?
In fact I knew that older version is installed.

> Or that
> you don't care, you just want to have the package *installed*.
I think that it is. My expectation is that package managed behaves declaratively (in some sense): I want to get the package installed.

> Or just that
> it worked in YUM and you are used to it?
This is surely part of that too!

> Or do you expect different
> behaviour when you type just package names and when you type a full URL?
My expectation is that if user enters URL to RPM (which includes path to RPM file on filesystem) then this RPM should be installed no matter what (install/upgrade/downgrade or even uninstall conflicting packages - after a confirmation, of course).

This is what I tried to describe in length here:
https://lists.fedoraproject.org/pipermail/devel/2014-December/205306.html

> Please help me to understand your expectations. It would be very valuable.
Let me know if you want some clarification.

Comment 8 Radek Holy 2015-01-08 10:58:11 UTC
(In reply to Neal Becker from comment #6)
> 2. I did install because upgrade means remove the old kernel, which is not
> what I wanted.  I wanted to keep both installed.

Yes, that's why I changed the duplicate of your bug. I agree with you. In case of installonlies, I think it's counterintuitive to force user to use "upgrade" or "downgrade".
Thank you.

(In reply to Petr Spacek from comment #7)
> This is what I tried to describe in length here:
> https://lists.fedoraproject.org/pipermail/devel/2014-December/205306.html

Oh, that was you. Thank you again :)

Comment 9 Honza Silhan 2015-01-15 16:26:34 UTC

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

Comment 10 Radek Holy 2015-02-09 14:28:30 UTC

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


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