Bug 1107737 - Exit code 0 with 'dnf install existing not-existing'
Summary: Exit code 0 with 'dnf install existing not-existing'
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 20
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Michal Luscon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1113080 1128139 (view as bug list)
Depends On:
Blocks: 1045076 1072957
TreeView+ depends on / blocked
 
Reported: 2014-06-10 13:48 UTC by Adam Samalik
Modified: 2016-07-25 15:33 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1107742 (view as bug list)
Environment:
Last Closed: 2015-02-13 10:51:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1359810 0 urgent CLOSED cmd 'dnf install I_dont_exit zsh' installs nothing 2021-02-22 00:41:40 UTC

Internal Links: 1359810

Description Adam Samalik 2014-06-10 13:48:05 UTC
Description of problem:
When I run for example 'dnf install bash fdfrhewiaur' (first package exists, the second doesn't), I got an exit code 0. 

Version-Release number of selected component (if applicable):
dnf-0:0.5.2-1.fc20.noarch

How reproducible:

Steps to Reproduce:
1. dnf install bash fdfrhewiaur

Actual results:
exit code == 0

Expected results:
exit code != 0

Additional info:
I got the same behaviour with yum as well.

Comment 1 Ales Kozumplik 2014-06-10 13:54:34 UTC
Thanks, we'll take a look.

Comment 2 Honza Silhan 2014-11-19 12:29:45 UTC
*** Bug 1128139 has been marked as a duplicate of this bug. ***

Comment 3 Radek Holy 2015-02-04 11:29:20 UTC
*** Bug 1113080 has been marked as a duplicate of this bug. ***

Comment 4 Radek Holy 2015-02-04 11:38:56 UTC
Just to make it clear, the expected behaviour in this case (and that's how we are going to fix this) is that DNF should fail (aka install nothing) with a non-zero exit status.
When we fix this, there will be no command that allows you to install just the installable packages and skip the arguments that match packages that cannot be installed. There should be a really good use case for such a command that is not known to us yet.

Comment 5 Kamil Dudka 2015-02-04 12:02:20 UTC
(In reply to Radek Holy from comment #4)
> Just to make it clear, the expected behaviour in this case (and that's how
> we are going to fix this) is that DNF should fail (aka install nothing) with
> a non-zero exit status.

Yes, the non-zero exit status is very important here.

> When we fix this, there will be no command that allows you to install just
> the installable packages and skip the arguments that match packages that
> cannot be installed. There should be a really good use case for such a
> command that is not known to us yet.

When installing (build) dependencies of a package interactively, I would like dnf to install all the packages that it knows to install and then let me (the user) install the missing ones manually.  AFAIK, this functionality is already missing in yum-builddep.

Please have a look at the --continue-on-failure option of Paludis:

http://paludis.exherbo.org/clients/cave-resolve.html

Comment 6 Radek Holy 2015-02-04 12:16:56 UTC
Kamil, feel free to open an RFE if you run into a real situation that cannot be (and should be) solved by DNF.

Comment 7 Michal Luscon 2015-02-13 10:51:16 UTC
Fixed by upstream commit 5bc2e739e47923d728359cb5e2447fa8e0183199 ( https://github.com/rpm-software-management/dnf/commit/5bc2e739e47923d728359cb5e2447fa8e0183199 ).


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