Bug 1651574

Summary: Inconsistent return values
Product: Red Hat Enterprise Linux 8 Reporter: Jaroslav Mracek <jmracek>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Eva Mrakova <emrakova>
Severity: unspecified Docs Contact:
Priority: high    
Version: 8.0CC: dmach, emrakova, extras-qa, frank.bruetting, james.antill, jberan, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.0.9-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1541832 Environment:
Last Closed: 2019-06-14 00:59:39 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:
Bug Depends On: 1541832    
Bug Blocks:    

Description Jaroslav Mracek 2018-11-20 11:27:31 UTC
+++ This bug was initially created as a clone of Bug #1541832 +++

Description of problem:
Trying to install an already installed program returns 0, while trying to remove a not present program returns 1. Doesn’t make any sense to me…


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

How reproducible:
Always

Steps to Reproduce:
1. `dnf install dnf` ⇒ 0
2. `dnf install <not installed program>` ⇒ 1


Expected results:
Both commands should return 0. They output just states, that nothing has to be done – so why should that be an error?

--- Additional comment from Fedora End Of Life on 2018-02-20 10:32:18 EST ---

This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

--- Additional comment from Pavla Kratochvilova on 2018-10-01 06:35:19 EDT ---

PR: https://github.com/rpm-software-management/dnf/pull/1227

--- Additional comment from Pavla Kratochvilova on 2018-10-04 01:24:39 EDT ---

Reassigning to jmracek who is more competent to solve this. Please ignore the above PR.

--- Additional comment from Jaroslav Mracek on 2018-11-20 06:26:45 EST ---

I created a patch (https://github.com/rpm-software-management/dnf/pull/1269) that should unify behavior.

Comment 1 Jaroslav Mracek 2018-11-20 11:30:05 UTC
This is part of yum-dnf compatibility.