[2/2] ipk: Decode byte data to string in manifest handling

Message ID 20220302132143.3619841-2-andrew@aj.id.au
State Accepted, archived
Commit cf9df9e8d89fee9cea4785c94a1e3004a5f3469d
Headers show
Series [1/2] ipk: Import re in manifest module | expand

Commit Message

Andrew Jeffery March 2, 2022, 1:21 p.m. UTC
```
File: '/home/andrew/src/openbmc/openbmc/meta/lib/oe/package_manager/ipk/manifest.py', lineno: 69, function: create_full
     0065:        output = pm.dummy_install(pkgs_to_install)
     0066:
     0067:        with open(self.full_manifest, 'w+') as manifest:
     0068:            pkg_re = re.compile('^Installing ([^ ]+) [^ ].*')
 *** 0069:            for line in set(output.split('\n')):
     0070:                m = pkg_re.match(line)
     0071:                if m:
     0072:                    manifest.write(m.group(1) + '\n')
     0073:
Exception: TypeError: a bytes-like object is required, not 'str'
```

Change-Id: Ifefb13bfa22c766d20ab9f73f7abe5163b3df86f
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 meta/lib/oe/package_manager/ipk/manifest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/lib/oe/package_manager/ipk/manifest.py b/meta/lib/oe/package_manager/ipk/manifest.py
index 22669f97c082..ae451c5c70d3 100644
--- a/meta/lib/oe/package_manager/ipk/manifest.py
+++ b/meta/lib/oe/package_manager/ipk/manifest.py
@@ -62,7 +62,7 @@  class PkgManifest(Manifest):
         if len(pkgs_to_install) == 0:
             return
 
-        output = pm.dummy_install(pkgs_to_install)
+        output = pm.dummy_install(pkgs_to_install).decode('utf-8')
 
         with open(self.full_manifest, 'w+') as manifest:
             pkg_re = re.compile('^Installing ([^ ]+) [^ ].*')