Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514318 - dnf -c configfile option assumes a local file [NEEDINFO]
Summary: dnf -c configfile option assumes a local file
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 27
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Marek Blaha
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-17 04:00 UTC by Martin
Modified: 2018-05-29 17:21 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-05-29 17:21:17 UTC
mblaha: needinfo? (martinrsssf)

Attachments (Terms of Use)

Description Martin 2017-11-17 04:00:49 UTC
Description of problem:

I try to use dnf to install a package using a config file that is stored on a web server using -c URL, but it gives an error that file 'URL' is not found. The URL does point to a proper config file.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. setup a web server containing a dnf config file, e.g. http://localhost/dnfconfig.repo
2. run dnf using config file stored in web server:
     dnf -c http://localhost/dnfconfig.repo update

Actual results:
[Errno 2] No such file or directory: 'http://localhost/dnfconfig.repo'

Expected results:
dnf should read the config file dnfconfig.repo from the web server and start updating/installing packages.

Additional info:

It used to work in Fedora 25.

Interestingly, if I create an empty file in local path ./http:/localhost/dnfconfig.repo, it actually loads the config file from the web site, and starts updating! It doesn't matter what the local file actually looks like, so this is hacky workaround.

From this observation, it looks like dnf -c option now assumes it's always a local filepath, but then proceeds to work as before when the filepath happens to be in a form of a URL.

Comment 1 Marek Blaha 2018-01-04 10:33:31 UTC
Hi, I'm sorry, but I'm not able to reproduce this bug. I tried your steps and dnf was working (and reading config file from URL) normally:

# dnf -c http://localhost/dnfconfig.repo upgrade
Last metadata expiration check: 1:25:32 ago on Thu 04 Jan 2018 10:01:11 CET.
Dependencies resolved.
Nothing to do.

When I used non-existent URL, dnf complaint on it, but then just ignored this config file and continued working:

# dnf -c http://localhost/xxdnfconfig.repo upgrade
Can not read configuration: http://localhost/xxdnfconfig.repo , ignoring
Can not read configuration: http://localhost/xxdnfconfig.repo , ignoring
Last metadata expiration check: 2:05:58 ago on Thu 04 Jan 2018 09:22:06 CET.
Dependencies resolved.
Nothing to do.

Please, can you attach dnf.log (usually located at /var/log/ directory).

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