Bug 1788182
| Summary: | [abrt] DNF raises RuntimeError when passing invalid values to `--repofrompath` | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Allan Lewis <allanlewis99> | ||||||||||||||||||||||||||||
| Component: | dnf | Assignee: | Lukáš Hrázký <lhrazky> | ||||||||||||||||||||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||||||||||||||||||||
| Priority: | unspecified | ||||||||||||||||||||||||||||||
| Version: | 31 | CC: | amatej, jmracek, jrohel, lhrazky, mblaha, mhatina, packaging-team-maint, pkratoch, rpm-software-management, vmukhame | ||||||||||||||||||||||||||||
| Target Milestone: | --- | Keywords: | Triaged | ||||||||||||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||||||||||||||
| Hardware: | x86_64 | ||||||||||||||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||||||||||||||
| URL: | https://retrace.fedoraproject.org/faf/reports/bthash/50eaf315ac1bee627dadf525bc5c9fbc7ba57c1c | ||||||||||||||||||||||||||||||
| Whiteboard: | abrt_hash:82047bd1d310779da65c4da681bf10738f48cad6;VARIANT_ID=workstation; | ||||||||||||||||||||||||||||||
| Fixed In Version: | dnf-4.2.23-1.fc32 dnf-4.2.23-1.fc31 | Doc Type: | If docs needed, set a value | ||||||||||||||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||||||||||||||
| Last Closed: | 2020-06-05 02:29:54 UTC | Type: | --- | ||||||||||||||||||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||||||||||||||||||
| Documentation: | --- | CRM: | |||||||||||||||||||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||||||||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||||||||||||||
| Embargoed: | |||||||||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||||||||
Created attachment 1650155 [details]
File: _var_log_dnf.log
Created attachment 1650156 [details]
File: _var_tmp_dnf-allan.lewis-qo7a7nhx_dnf.librepo.log
Created attachment 1650157 [details]
File: _var_tmp_dnf-allan.lewis-qo7a7nhx_dnf.log
Created attachment 1650158 [details]
File: _var_tmp_dnf-allan.lewis-qo7a7nhx_dnf.rpm.log
Created attachment 1650159 [details]
File: _var_tmp_dnf-allan.lewis-qo7a7nhx_hawkey.log
Created attachment 1650160 [details]
File: backtrace
Created attachment 1650161 [details]
File: cgroup
Created attachment 1650162 [details]
File: cpuinfo
Created attachment 1650163 [details]
File: dnf-makecache.log
Created attachment 1650164 [details]
File: environ
Created attachment 1650165 [details]
File: mountinfo
Created attachment 1650166 [details]
File: namespaces
Created attachment 1650167 [details]
File: open_fds
Hello Allan, it is a sad fact that there are a lot of unhandled exceptions in dnf. Thanks for the report though, I'll try to fix this one once my PR for allowing to even handle the exceptions goes through: https://github.com/rpm-software-management/libdnf/pull/866 PRs: https://github.com/rpm-software-management/libdnf/pull/938 https://github.com/rpm-software-management/dnf/pull/1617 https://github.com/rpm-software-management/ci-dnf-stack/pull/818 FEDORA-2020-f3f7292b39 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f3f7292b39 FEDORA-2020-a943fde9ba has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-a943fde9ba FEDORA-2020-f3f7292b39 has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-f3f7292b39` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f3f7292b39 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-a943fde9ba has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-a943fde9ba` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-a943fde9ba See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-a943fde9ba has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-f3f7292b39 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report. |
Description of problem: I was testing a repo I created using `dnf reposync` but used the wrong syntax for `--repofrompath`: I put the URL first instead of the repo name. My mistake, but it caused an unhandled exception. Version-Release number of selected component: dnf-4.2.17-1.fc31 Additional info: reporter: libreport-2.11.3 cmdline: /usr/bin/python3 /usr/bin/dnf --repofrompath /mnt/nas/repo/mirror2/centos/8/2020-01-06/extras,extras --repo extras list crash_function: __init__ exception_type: RuntimeError executable: /usr/bin/dnf interpreter: python3-3.7.5-2.fc31.x86_64 kernel: 5.3.15-300.fc31.x86_64 runlevel: N 5 type: Python3 uid: 1000 Truncated backtrace: repo.py:440:__init__:RuntimeError: Bad id for repo: /mnt/nas/repo/mirror2/centos/8/2020-01-06/extras, byte = / 0 Traceback (most recent call last): File "/usr/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 191, in user_main errcode = main(args) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 65, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 94, in _main cli.configure(list(map(ucd, args)), option_parser()) File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 969, in configure self._configure_repos(opts) File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 753, in _configure_repos this_repo = self.base.repos.add_new_repo(label, self.base.conf, baseurl=[path]) File "/usr/lib/python3.7/site-packages/dnf/repodict.py", line 86, in add_new_repo repo = dnf.repo.Repo(repoid, conf) File "/usr/lib/python3.7/site-packages/dnf/repo.py", line 427, in __init__ self._repo = libdnf.repo.Repo(name if name else "", self._config) File "/usr/lib64/python3.7/site-packages/libdnf/repo.py", line 440, in __init__ _repo.Repo_swiginit(self, _repo.new_Repo(id, config)) RuntimeError: Bad id for repo: /mnt/nas/repo/mirror2/centos/8/2020-01-06/extras, byte = / 0 Local variables in innermost frame: self: <libdnf.repo.Repo; > id: '/mnt/nas/repo/mirror2/centos/8/2020-01-06/extras' config: <libdnf.conf.ConfigRepo; proxy of <Swig Object of type 'libdnf::ConfigRepo *' at 0x7f2e3cc733c0> >