Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1541832

Summary: Inconsistent return values
Product: [Fedora] Fedora Reporter: Frank <frank.bruetting>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dmach, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.0.9-1.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1651574 (view as bug list) Environment:
Last Closed: 2018-12-05 02:34:29 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:    
Bug Blocks: 1651574    

Description Frank 2018-02-05 02:31:53 UTC
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?

Comment 1 Fedora End Of Life 2018-02-20 15:32:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Pavla Kratochvilova 2018-10-01 10:35:19 UTC
PR: https://github.com/rpm-software-management/dnf/pull/1227

Comment 3 Pavla Kratochvilova 2018-10-04 05:24:39 UTC
Reassigning to jmracek who is more competent to solve this. Please ignore the above PR.

Comment 4 Jaroslav Mracek 2018-11-20 11:26:45 UTC
I created a patch (https://github.com/rpm-software-management/dnf/pull/1269) that should unify behavior.

Comment 5 Fedora Update System 2018-11-22 18:57:28 UTC
libdnf-0.22.3-1.fc29 dnf-4.0.9-1.fc29 dnf-plugins-core-4.0.2-1.fc29 dnf-plugins-extras-4.0.0-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-17cbc3c616

Comment 6 Fedora Update System 2018-11-23 02:57:01 UTC
dnf-4.0.9-1.fc29, dnf-plugins-core-4.0.2-1.fc29, dnf-plugins-extras-4.0.0-1.fc29, libdnf-0.22.3-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-17cbc3c616

Comment 7 Fedora Update System 2018-12-05 02:34:29 UTC
dnf-4.0.9-1.fc29, dnf-plugins-core-4.0.2-1.fc29, dnf-plugins-extras-4.0.0-1.fc29, libdnf-0.22.3-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.