Bug 1493489

Summary: yum-config-manager --add-repo returns 0 on failure
Product: Red Hat Enterprise Linux 7 Reporter: Valentina Mukhamedzhanova <vmukhame>
Component: yum-utilsAssignee: Michal Domonkos <mdomonko>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.5CC: dahorak, emrakova, extras-qa, ihrachys, jmracek, mdomonko, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-utils-1.1.31-50.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1439514 Environment:
Last Closed: 2018-10-30 11:40:47 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: 1439514    
Bug Blocks: 1549618    

Description Valentina Mukhamedzhanova 2017-09-20 10:36:41 UTC
This is done in dnf, should also be done in yum-utils.

+++ This bug was initially created as a clone of Bug #1439514 +++

[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.

--- Additional comment from Honza Silhan on 2017-04-12 13:12:53 CEST ---

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?

--- Additional comment from Valentina Mukhamedzhanova on 2017-05-02 17:11:07 CEST ---

I have no objection to fixing this.

--- Additional comment from Jaroslav Mracek on 2017-06-19 20:46:22 CEST ---

I created a pull-request that should fix the issue (https://github.com/rpm-software-management/dnf-plugins-core/pull/225).

--- Additional comment from Fedora Update System on 2017-07-24 16:50:14 CEST ---

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

--- Additional comment from Fedora Update System on 2017-07-25 06:26:23 CEST ---

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

--- Additional comment from Fedora Update System on 2017-07-25 18:55:10 CEST ---

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.

Comment 2 Valentina Mukhamedzhanova 2018-03-01 11:30:29 UTC
*** Bug 1516432 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2018-10-30 11:40:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3280