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>"
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. ***
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.