Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1649284
Summary: | Package.remote_location fails with AttributeError when using repository with baseurl | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jan Staněk <jstanek> | ||||
Component: | dnf | Assignee: | Marek Blaha <mblaha> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 29 | CC: | dmach, jmracek, jpokorny, mblaha, mhatina, packaging-team-maint, rpm-software-management, vmukhame | ||||
Target Milestone: | --- | Keywords: | Triaged | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | dnf-4.0.9-1.fc29 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-12-05 02:34:36 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: | 1639827 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
PR https://github.com/rpm-software-management/dnf/pull/1264 fixes the error. The problem is already fixed by https://github.com/rpm-software-management/dnf/commit/3d40275c0fd1a9781dafaefc9580ebf364ee9a6a. *** Bug 1649898 has been marked as a duplicate of this bug. *** *** Bug 1649898 has been marked as a duplicate of this bug. *** libdnf-0.22.3-1.fc29 dnf-4.0.9-1.fc29 dnf-plugins-core-4.0.2-1.fc29 dnf-plugins-extras-4.0.0-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-17cbc3c616 dnf-4.0.9-1.fc29, dnf-plugins-core-4.0.2-1.fc29, dnf-plugins-extras-4.0.0-1.fc29, libdnf-0.22.3-1.fc29 has been pushed to the Fedora 29 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-2018-17cbc3c616 Note that "tainted metadata" problem per [bug 1649898 comment 5] is not addressed with an update to dnf-4.0.9-1.fc30.noarch dnf-plugins-core-4.0.2-1.fc30.noarch python3-dnf-4.0.9-1.fc30.noarch python3-dnf-plugins-core-4.0.2-1.fc30.noarch dnf-data-4.0.9-1.fc30.noarch libdnf-0.22.3-1.fc30.x86_64 python3-hawkey-0.22.3-1.fc30.x86_64 python3-libdnf-0.22.3-1.fc30.x86_64 dnf-utils-4.0.2-1.fc30.noarch (from dnf-4.0.4-2.fc30.noarch dnf-plugins-core-4.0.0-2.fc30.noarch python3-dnf-4.0.4-2.fc30.noarch python3-dnf-plugins-core-4.0.0-2.fc30.noarch dnf-data-4.0.4-2.fc30.noarch libdnf-0.22.0-8.fc30.x86_64 python3-hawkey-0.22.0-8.fc30.x86_64 python3-libdnf-0.22.0-8.fc30.x86_64 dnf-utils-4.0.0-2.fc30.noarch ) given that these two bugs are related at all, but since the other bug was closed as a duplicate of this one, I assume so. Command "dnf clean metadata" (or waiting for them to expire eventually?) to the rescue, however that's not the expected user's convenience, IMHO. Looks like an infrastructure for invalidating/cleaning metadata (e.g. along the sketched lines) in cases like that is needed independently of this very instance. dnf-4.0.9-1.fc29, dnf-plugins-core-4.0.2-1.fc29, dnf-plugins-extras-4.0.0-1.fc29, libdnf-0.22.3-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 1505187 [details] Simple reproducer script Description of problem: When the method `remote_location()` is called on dnf.package.Package object retrieved from a dnf.repo.Repo configured with `baseurl`, it fails with `AttributeError: 'VectorString' object has no attribute 'decode'`. See attached reproducer for details. Version-Release number of selected component (if applicable): dnf-4.0.4-2.fc29 How reproducible: Always. Steps to Reproduce: 1. Run reproducer script. Actual results: Traceback (most recent call last): File "reproducer.py", line 24, in <module> print("Remote location of", ARBITRARY_PKG_NAME, "is", pkg.remote_location()) File "/usr/lib/python3.7/site-packages/dnf/package.py", line 248, in remote_location return schemes_filter([self.repo.baseurl]) File "/usr/lib/python3.7/site-packages/dnf/package.py", line 231, in schemes_filter s = dnf.pycomp.urlparse.urlparse(url)[0] File "/usr/lib64/python3.7/urllib/parse.py", line 367, in urlparse url, scheme, _coerce_result = _coerce_args(url, scheme) File "/usr/lib64/python3.7/urllib/parse.py", line 123, in _coerce_args return _decode_args(args) + (_encode_result,) File "/usr/lib64/python3.7/urllib/parse.py", line 107, in _decode_args return tuple(x.decode(encoding, errors) if x else '' for x in args) File "/usr/lib64/python3.7/urllib/parse.py", line 107, in <genexpr> return tuple(x.decode(encoding, errors) if x else '' for x in args) File "/usr/lib64/python3.7/site-packages/libdnf/module.py", line 828, in <lambda> __getattr__ = lambda self, name: _swig_getattr(self, VectorString, name) File "/usr/lib64/python3.7/site-packages/libdnf/module.py", line 80, in _swig_getattr raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) AttributeError: 'VectorString' object has no attribute 'decode' Expected results: "Remote location of abcde is <URI>"