Bug 1416782 - Repoclosure exits with 0 even if there are problems
Summary: Repoclosure exits with 0 even if there are problems
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 26
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-26 11:49 UTC by Lubomír Sedlář
Modified: 2017-06-14 14:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-06-14 14:40:05 UTC
Type: Bug

Attachments (Terms of Use)

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
$ rpm -q python3-dnf-plugins-extras-repoclosure

How reproducible:

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 $?

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.

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