| |
@@ -400,7 +400,7 @@
|
| |
# Get package name from rpm headers
|
| |
try:
|
| |
rpm_hdr = kobo.rpmlib.get_rpm_header(source)
|
| |
- rpm_name = kobo.rpmlib.get_header_field(rpm_hdr, "name").decode("utf-8")
|
| |
+ rpm_name = to_text_type(kobo.rpmlib.get_header_field(rpm_hdr, "name"))
|
| |
except Exception:
|
| |
raise ValueError("Provided srpm is invalid: {}".format(source))
|
| |
|
| |
Attempts to locally build a module on Rawhide (F31) that includes a custom SRPM (via the
--srpm
option) results in a failure such as the following:This turns out to be caused by a change introduced when
python3-kobo-rpmlib
was updated to version10.0-1
in Rawhide: https://github.com/release-engineering/kobo/pull/115With that change,
kobo.rpmlib.get_header_field()
returns typestr
. Older versions returned typebytes
. This fix allows either return type by only attempting todecode()
the returned value if it is typebytes
.