Bug 1149972

Summary: update command implicitly working as reinstall
Product: [Fedora] Fedora Reporter: Parag Nemade <pnemade>
Component: dnfAssignee: Honza Silhan <jsilhan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: akozumpl, jsilhan, pnemade, rholy, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-0.6.3-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-13 09:53: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:

Description Parag Nemade 2014-10-07 05:00:36 UTC
Description of problem:

Why can't dnf tells me that I have already installed this package? And if I want to reinstall a package I can see there is a command reinstall available to dnf. Following command never failed and always runs successfully.

$ sudo dnf update /home/parag/Downloads/dnf-0.6.2-1.fc21.noarch.rpm /home/parag/Downloads/python3-dnf-0.6.2-1.fc21.noarch.rpm 
Dependencies resolved.
================================================================================
 Package            Arch          Version             Repository           Size
================================================================================
Reinstalling:
 dnf                noarch        0.6.2-1.fc21        @commandline        548 k
 python3-dnf        noarch        0.6.2-1.fc21        @commandline        403 k

Transaction Summary
================================================================================

Total size: 951 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Reinstalling: dnf-0.6.2-1.fc21.noarch                                     1/4 
  Reinstalling: python3-dnf-0.6.2-1.fc21.noarch                             2/4 
  Erasing     : python3-dnf-0.6.2-1.fc21.noarch                             3/4 
  Erasing     : dnf-0.6.2-1.fc21.noarch                                     4/4 
  Verifying   : dnf-0.6.2-1.fc21.noarch                                     1/4 
  Verifying   : python3-dnf-0.6.2-1.fc21.noarch                             2/4 
  Verifying   : python3-dnf-0.6.2-1.fc21.noarch                             3/4 
  Verifying   : dnf-0.6.2-1.fc21.noarch                                     4/4 

Reinstalled:
  dnf.noarch 0.6.2-1.fc21            python3-dnf.noarch 0.6.2-1.fc21           

Complete!



Version-Release number of selected component (if applicable):
python3-dnf-0.6.2-1.fc21.noarch
dnf-0.6.2-1.fc21.noarch
dnf-langpacks-0.3.1-2.fc21.noarch


How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
update behaving like reinstall

Expected results:
update should check if its already installed and say like that

Additional info:

Comment 1 Tim Lauridsen 2014-10-07 05:38:28 UTC
and if the rpm version is older than installed version it will do a downgrading instead.

dnf install was fixed in 0.6.2 to only install if the package was not installed allready.

dnf update foobar.rpm should only work if if foobar is installed and foobar.rpm is a update to foobar.

same thing goes from reinstall foobar.rpm and downgrade foobar.rpm

Comment 2 Honza Silhan 2014-10-08 11:57:04 UTC
Hi, thanks for the report. It should work as you said.

Comment 3 Honza Silhan 2014-11-04 12:55:24 UTC
Fixed in the upstream.

Comment 4 Fedora Update System 2014-12-09 14:06:49 UTC
dnf-0.6.3-2.fc21,dnf-plugins-core-0.1.4-1.fc21,hawkey-0.5.2-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-0.6.3-2.fc21,dnf-plugins-core-0.1.4-1.fc21,hawkey-0.5.2-1.fc21

Comment 5 Fedora Update System 2014-12-12 04:32:56 UTC
Package dnf-0.6.3-2.fc21, hawkey-0.5.2-1.fc21, dnf-plugins-core-0.1.4-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.6.3-2.fc21 hawkey-0.5.2-1.fc21 dnf-plugins-core-0.1.4-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-16760/dnf-0.6.3-2.fc21,dnf-plugins-core-0.1.4-1.fc21,hawkey-0.5.2-1.fc21
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-12-13 09:53:58 UTC
dnf-0.6.3-2.fc21, hawkey-0.5.2-1.fc21, dnf-plugins-core-0.1.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.