diff options
3 files changed, 27 insertions, 34 deletions
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd/0001-fwupd-Drop-unsupported-xml_declaration-parameter.patch b/meta-oe/recipes-bsp/fwupd/fwupd/0001-fwupd-Drop-unsupported-xml_declaration-parameter.patch deleted file mode 100644 index 8fd0234695..0000000000 --- a/meta-oe/recipes-bsp/fwupd/fwupd/0001-fwupd-Drop-unsupported-xml_declaration-parameter.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | From 88a97229350010d73cee0ff38da0dbbe0a449dd2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 12 Sep 2022 11:20:59 -0700 | ||
| 4 | Subject: [PATCH] fwupd: Drop unsupported xml_declaration parameter | ||
| 5 | |||
| 6 | This is not needed on Python3.7 | ||
| 7 | |||
| 8 | Fixes | ||
| 9 | wupd-1.8.4/contrib/generate-gresource-xml.py", line 26, in <module> | ||
| 10 | f.write(ET.tostring(root, "utf-8", xml_declaration=True)) | ||
| 11 | TypeError: tostring() got an unexpected keyword argument 'xml_declaration' | ||
| 12 | |||
| 13 | Upstream-Status: Submitted [https://github.com/fwupd/fwupd/pull/5025] | ||
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 15 | --- | ||
| 16 | contrib/generate-gresource-xml.py | 2 +- | ||
| 17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/contrib/generate-gresource-xml.py b/contrib/generate-gresource-xml.py | ||
| 20 | index 235a7700..4429f988 100755 | ||
| 21 | --- a/contrib/generate-gresource-xml.py | ||
| 22 | +++ b/contrib/generate-gresource-xml.py | ||
| 23 | @@ -23,6 +23,6 @@ for fn in sorted(sys.argv[2:]): | ||
| 24 | n_file.set("preprocess", "xml-stripblanks") | ||
| 25 | n_file.set("alias", os.path.basename(fn)) | ||
| 26 | with open(sys.argv[1], "wb") as f: | ||
| 27 | - f.write(ET.tostring(root, "utf-8", xml_declaration=True)) | ||
| 28 | + f.write(ET.tostring(root, "utf-8")) | ||
| 29 | |||
| 30 | sys.exit(0) | ||
| 31 | -- | ||
| 32 | 2.37.3 | ||
| 33 | |||
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd/c54ae9c524998e449b822feb465a0c90317cd735.patch b/meta-oe/recipes-bsp/fwupd/fwupd/c54ae9c524998e449b822feb465a0c90317cd735.patch new file mode 100644 index 0000000000..947c764030 --- /dev/null +++ b/meta-oe/recipes-bsp/fwupd/fwupd/c54ae9c524998e449b822feb465a0c90317cd735.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | From c54ae9c524998e449b822feb465a0c90317cd735 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 20 Sep 2022 15:10:26 +0100 | ||
| 4 | Subject: [PATCH] trivial: Fix compile when using python 3.7 or older | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/fwupd/fwupd/pull/5051] | ||
| 7 | Signed-off-by: Richard Hughes <richard@hughsie.com> | ||
| 8 | --- | ||
| 9 | contrib/generate-gresource-xml.py | 5 ++++- | ||
| 10 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 11 | |||
| 12 | diff --git a/contrib/generate-gresource-xml.py b/contrib/generate-gresource-xml.py | ||
| 13 | index 235a770020..569c804937 100755 | ||
| 14 | --- a/contrib/generate-gresource-xml.py | ||
| 15 | +++ b/contrib/generate-gresource-xml.py | ||
| 16 | @@ -23,6 +23,9 @@ | ||
| 17 | n_file.set("preprocess", "xml-stripblanks") | ||
| 18 | n_file.set("alias", os.path.basename(fn)) | ||
| 19 | with open(sys.argv[1], "wb") as f: | ||
| 20 | - f.write(ET.tostring(root, "utf-8", xml_declaration=True)) | ||
| 21 | + try: | ||
| 22 | + f.write(ET.tostring(root, "utf-8", xml_declaration=True)) | ||
| 23 | + except TypeError: | ||
| 24 | + f.write(ET.tostring(root, "utf-8")) | ||
| 25 | |||
| 26 | sys.exit(0) | ||
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd_1.8.4.bb b/meta-oe/recipes-bsp/fwupd/fwupd_1.8.4.bb index 2e9921d37d..72f37aea85 100644 --- a/meta-oe/recipes-bsp/fwupd/fwupd_1.8.4.bb +++ b/meta-oe/recipes-bsp/fwupd/fwupd_1.8.4.bb | |||
| @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" | |||
| 5 | DEPENDS = "glib-2.0 libxmlb json-glib libjcat gcab vala-native" | 5 | DEPENDS = "glib-2.0 libxmlb json-glib libjcat gcab vala-native" |
| 6 | 6 | ||
| 7 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \ | 7 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \ |
| 8 | file://0001-fwupd-Drop-unsupported-xml_declaration-parameter.patch \ | 8 | file://c54ae9c524998e449b822feb465a0c90317cd735.patch \ |
| 9 | file://run-ptest" | 9 | file://run-ptest" |
| 10 | SRC_URI[sha256sum] = "adfa07434cdc29ec41c40fef460e8d970963fe0c7e849dec7f3932adb161f886" | 10 | SRC_URI[sha256sum] = "adfa07434cdc29ec41c40fef460e8d970963fe0c7e849dec7f3932adb161f886" |
| 11 | 11 | ||
