Bug 1844925 - when i execute "dnf download" failed i want to get return value 1 not 0 in shell.
Summary: when i execute "dnf download" failed i want to get return value 1 not 0 in sh...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 32
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-08 03:37 UTC by zhangrui182
Modified: 2020-12-02 07:04 UTC (History)
9 users (show)

Fixed In Version: dnf-plugins-core-4.0.18-1.fc32.noarch
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-02 07:04:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description zhangrui182 2020-06-08 03:37:08 UTC
Description of problem:
when i execute "dnf download --resolv --destdir=/home/tmp libunwind-devel"
i got an error but "echo $?" still return 0

Version-Release number of selected component (if applicable):
dnf-plugins-core-4.0.14-1.fc32.noarch

How reproducible:

Steps to Reproduce:
1.dnf download --resolv --destdir=/home/tmp libunwind-devel
2.echo $?
3.

Actual results:
[root@localhost ~]# dnf download --resolve --destdir=/home/tmp libunwind-devel
Last metadata expiration check: 0:05:57 ago on Mon 08 Jun 2020 11:07:42 AM CST.
Error in resolve of packages:
    libunwind-devel-2:1.3.1-10.eulerosv2r9.aarch64

 Problem: conflicting requests
  - nothing provides libunwind = 1.3.1-10.eulerosv2r9 needed by libunwind-devel-2:1.3.1-10.eulerosv2r9.aarch64
[root@localhost libunwind]# echo $?
0
[root@localhost libunwind]#

Expected results:
echo $?
1

Additional info:
https://github.com/zhangrui182/dnf-plugins-core/pull/1

Comment 1 amatej 2020-06-08 12:19:40 UTC
Can you open the pull request against our repository as well https://github.com/rpm-software-management/dnf-plugins-core/pulls?

Comment 2 zhangrui182 2020-06-30 08:15:25 UTC
I tried to fix this with pull-request: https://github.com/rpm-software-management/dnf-plugins-core/pull/400

Comment 3 Pavla Kratochvilova 2020-12-02 07:04:46 UTC
This is already fixed in dnf-plugins-core 4.0.18.

PR: https://github.com/rpm-software-management/dnf-plugins-core/pull/406
Tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/856


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