Bug 1541832 - Inconsistent return values
Summary: Inconsistent return values
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
(Show other bugs)
Version: 28
Hardware: Unspecified Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Triaged
Depends On:
Blocks: 1651574
TreeView+ depends on / blocked
 
Reported: 2018-02-05 02:31 UTC by Frank
Modified: 2018-12-05 02:34 UTC (History)
5 users (show)

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: ---


Attachments (Terms of Use)

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.


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