Bug 1304615
Summary: | TB when you try to enable non-existent copr project | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miroslav Suchý <msuchy> |
Component: | dnf-plugins-core | Assignee: | Jakub Kadlčík <jkadlcik> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 23 | CC: | bhurtelashish, bugzilla, jkadlcik, jsilhan, mluscon, packaging-team-maint, pnemade, RadekHolyPublic, vmukhame, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | dnf-plugins-core-0.1.19-1.fc23 dnf-plugins-core-0.1.19-1.fc24 dnf-plugins-core-0.1.19-1.fc22 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-03-25 01:23:38 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: |
Description
Miroslav Suchý
2016-02-04 07:55:04 UTC
Jakub, can you fix it please? Already reported in bug 1302235 There is one more bug 1302232 to look related to this. The line causing this problem is res = urllib.request.urlopen(self.copr_url + "/coprs/" + project_name, 'w+') status_code = res.getcode() Here: https://github.com/rpm-software-management/dnf-plugins-core/blob/8261eb9a060b0cbf57d82b4f94291242a4b233ec/plugins/copr.py#L272 Syntax for urlopen is urllib.request.urlopen(url, data=None, [timeout, ]*, cafile=None, capath=None, cadefault=False, context=None) so the 'w+' in our code is passed as `data` argument. Issue is that `data` can't be string, therefore it fails and solution would be encoding it. I can do that, but first, I want to ask Mirek. What is the purpose of 'w+' in this code? Do we really want to send 'w+' in data, or is it just a typo? I suspect that it could happen by copying some usage of dnfpluginscore.lib.urlopen(...., 'w+') Thanks This issue have origins in 1267808. In order to solve it, Honza Horak proposed a patch containing: - f = dnfpluginscore.lib.urlopen(self, None, api_url) + f = dnfpluginscore.lib.urlopen(self, None, api_url, "w+") which was modified and applied in aff262d. Unfortunately in this commit were changed even this lines: - res = urllib.request.urlopen(self.copr_url + "/coprs/" + project_name) + res = urllib.request.urlopen(self.copr_url + "/coprs/" + project_name, 'w+') and - res = urllib.urlopen(self.copr_url + "/coprs/" + project_name) + res = urllib.urlopen(self.copr_url + "/coprs/" + project_name, 'w+') I am sending following PR to fix it: https://github.com/rpm-software-management/dnf-plugins-core/pull/149 dnf-plugins-core-0.1.19-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d8b69dc579 dnf-plugins-core-0.1.19-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c0777f4cf3 dnf-plugins-core-0.1.19-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-adcfaafc5c dnf-plugins-core-0.1.19-1.fc24 has been pushed to the Fedora 24 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-2016-c0777f4cf3 dnf-plugins-core-0.1.19-1.fc22 has been pushed to the Fedora 22 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-2016-adcfaafc5c dnf-plugins-core-0.1.19-1.fc23 has been pushed to the Fedora 23 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-2016-d8b69dc579 dnf-plugins-core-0.1.19-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. dnf-plugins-core-0.1.19-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report. dnf-plugins-core-0.1.19-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. *** Bug 1288960 has been marked as a duplicate of this bug. *** *** Bug 1276932 has been marked as a duplicate of this bug. *** *** Bug 1298246 has been marked as a duplicate of this bug. *** |