Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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.0Flags: pm-rhel: mirror+
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.