Bug 1439514

Summary: dnf config-manager --add-repo returns 0 on failure
Product: [Fedora] Fedora Reporter: Ihar Hrachyshka <ihrachys>
Component: dnf-plugins-coreAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 25CC: jmracek, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-plugins-core-2.1.3-1.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1493489 (view as bug list) Environment:
Last Closed: 2017-07-25 16:55:10 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:
Bug Depends On:    
Bug Blocks: 1493489    

Description Ihar Hrachyshka 2017-04-06 07:05:21 UTC
[vagrant@localhost ~]$ sudo dnf config-manager --add-repo=http://download.devel.redhat.com/rel-eng/dist-git/fedora/rhpkg.repo
Adding repo from: http://download.devel.redhat.com/rel-eng/dist-git/fedora/rhpkg.repo
Curl error (6): Couldn't resolve host name for http://download.devel.redhat.com/rel-eng/dist-git/fedora/rhpkg.repo [Could not resolve host: download.devel.redhat.com]
[vagrant@localhost ~]$ echo $?
0

I believe it should return some other value on failure.

Comment 1 Honza Silhan 2017-04-12 11:12:53 UTC
The behavior is same as in yum.

Valentina, what do you think? Can we set this as a bug and have this fixed in yum too?

Comment 2 Valentina Mukhamedzhanova 2017-05-02 15:11:07 UTC
I have no objection to fixing this.

Comment 3 Jaroslav Mracek 2017-06-19 18:46:22 UTC
I created a pull-request that should fix the issue (https://github.com/rpm-software-management/dnf-plugins-core/pull/225).

Comment 4 Fedora Update System 2017-07-24 14:50:14 UTC
libdnf-0.9.3-1.fc26 dnf-plugins-core-2.1.3-1.fc26 dnf-2.6.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6f4c06b2d7

Comment 5 Fedora Update System 2017-07-25 04:26:23 UTC
dnf-2.6.2-1.fc26, dnf-plugins-core-2.1.3-1.fc26, libdnf-0.9.3-1.fc26 has been pushed to the Fedora 26 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-2017-6f4c06b2d7

Comment 6 Fedora Update System 2017-07-25 16:55:10 UTC
dnf-2.6.2-1.fc26, dnf-plugins-core-2.1.3-1.fc26, libdnf-0.9.3-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.