You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
From e9f51002c7dd0749723843f0c2270789faa01956 Mon Sep 17 00:00:00 2001
|
|
From: Neal Gompa <ngompa13@gmail.com>
|
|
Date: Fri, 12 Apr 2019 21:28:13 -0400
|
|
Subject: [PATCH] creator: Change to text strings for reading file list from
|
|
rpm
|
|
|
|
RPM changed its Python bindings for the RPM 4.15 release so that
|
|
everything is returned as text strings rather than byte arrays.
|
|
|
|
Adapt accordingly.
|
|
---
|
|
imgcreate/creator.py | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
|
|
index 51d92c7..e77a532 100644
|
|
--- a/imgcreate/creator.py
|
|
+++ b/imgcreate/creator.py
|
|
@@ -306,12 +306,9 @@ class ImageCreator(object):
|
|
def get_version(header):
|
|
version = None
|
|
for f in header['filenames']:
|
|
- if f.startswith(b'/boot/vmlinuz-'):
|
|
+ if f.startswith('/boot/vmlinuz-'):
|
|
version = f[14:]
|
|
- if version is None:
|
|
- return version
|
|
- else:
|
|
- return version.decode("utf-8")
|
|
+ return version
|
|
|
|
ts = rpm.TransactionSet(self._instroot)
|
|
|
|
--
|
|
2.20.1
|
|
|