Bug 1416782

Summary: Repoclosure exits with 0 even if there are problems
Product: [Fedora] Fedora Reporter: Lubomír Sedlář <lsedlar>
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 26CC: jmracek, jrohel, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: EasyFix, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-14 14:40:05 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:

Description Lubomír Sedlář 2017-01-26 11:49:33 UTC
Description of problem:
When dnf repoclosure finds unsatisfied dependencies in a repo, it prints the result, but the command still exits with 0, so it is hard to determine the result in scripts. Yum repoclosure exited with 1 in such case

Version-Release number of selected component (if applicable):
$ dnf repoclosure --version
2.0.0
$ rpm -q python3-dnf-plugins-extras-repoclosure
python3-dnf-plugins-extras-repoclosure-0.10.0-0.2rc1.fc26.noarch

How reproducible:
Always

Steps to Reproduce:
1. Copy any RPM (with at least one dependency) into a new directory.
2. Run createrepo_c .
3. Run dnf repoclosure --repofrompath=my-repo,file://$(pwd) --repo=my-repo
4. It should print info about unresolved deps
5. Run echo $?

Actual results:
It exits with 0.

Expected results:
It should exit with some other code.

Additional info:
Using yum repoclosure prints the same information, but exits with 1.

$ repoclosure --repofrompath=my-repo,file://$(pwd) --repoid=my-repo
$ echo $?
1

Comment 1 Honza Silhan 2017-01-30 13:35:55 UTC
This is planned to be fixed in next 1 month.

Comment 2 Fedora End Of Life 2017-02-28 11:03:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Jaroslav Rohel 2017-04-20 08:09:58 UTC
Fixed in PR https://github.com/rpm-software-management/dnf-plugins-core/pull/212

Comment 4 Jaroslav Mracek 2017-06-14 14:40:05 UTC
The patch was released in dnf-plugins-core-2.0.0-1 into rawhide and Fc26.