From 83c6b8bfe7cdf68221e6466e25422e8faeefdc48 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Wed, 6 Dec 2023 17:59:03 +0100 Subject: [PATCH] community/py3-dbusmock: add patch to fix bluez properties Submitted upstream: https://github.com/martinpitt/python-dbusmock/pull/190 --- ...5-Set-Modalias-Class-Icon-properties.patch | 29 +++++++++++++++++++ community/py3-dbusmock/APKBUILD | 5 +++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 community/py3-dbusmock/0001-bluez5-Set-Modalias-Class-Icon-properties.patch diff --git a/community/py3-dbusmock/0001-bluez5-Set-Modalias-Class-Icon-properties.patch b/community/py3-dbusmock/0001-bluez5-Set-Modalias-Class-Icon-properties.patch new file mode 100644 index 00000000000..7f8061c8d7e --- /dev/null +++ b/community/py3-dbusmock/0001-bluez5-Set-Modalias-Class-Icon-properties.patch @@ -0,0 +1,29 @@ +From a7224619eb412498436525f21c8801d7f201e1f6 Mon Sep 17 00:00:00 2001 +From: Luca Weiss +Date: Mon, 4 Dec 2023 21:32:09 +0100 +Subject: [PATCH] bluez5: Set Modalias, Class & Icon properties + +Otherwise we only emit those with PropertiesChanged but GetAll won't +return those properties. +--- + dbusmock/templates/bluez5.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/dbusmock/templates/bluez5.py b/dbusmock/templates/bluez5.py +index c94946f..dd3bf91 100644 +--- a/dbusmock/templates/bluez5.py ++++ b/dbusmock/templates/bluez5.py +@@ -474,6 +474,10 @@ def PairDevice(_self, adapter_device_name, device_address, class_): + 'Icon': dbus.String('phone', variant_level=1), + }) + ++ device.props[DEVICE_IFACE]['Modalias'] = dbus.String("bluetooth:v000Fp1200d1436", variant_level=1) ++ device.props[DEVICE_IFACE]['Class'] = dbus.UInt32(class_, variant_level=1) ++ device.props[DEVICE_IFACE]['Icon'] = dbus.String("phone", variant_level=1) ++ + device.EmitSignal(dbus.PROPERTIES_IFACE, 'PropertiesChanged', 'sa{sv}as', [ + DEVICE_IFACE, + { +-- +2.43.0 + diff --git a/community/py3-dbusmock/APKBUILD b/community/py3-dbusmock/APKBUILD index ea502a24d32..0509dd5ddd6 100644 --- a/community/py3-dbusmock/APKBUILD +++ b/community/py3-dbusmock/APKBUILD @@ -12,7 +12,9 @@ makedepends="python3-dev py3-setuptools" checkdepends="bash py3-nose py3-pytest" _pypiprefix="${_pyname%${_pyname#?}}" subpackages="$pkgname-pyc" -source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz" +source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz + 0001-bluez5-Set-Modalias-Class-Icon-properties.patch + " builddir="$srcdir/$_pyname-$pkgver" build() { @@ -31,4 +33,5 @@ package() { sha512sums=" 280a8ebfe12a0f5b309d5b807547ed521c80c9899fdc89abaaee238621cf94d05f8413ab2908ca331f9d3ef1c610234dafbd912f8590f18c7d9cafe470beece6 python-dbusmock-0.30.0.tar.gz +9f00629be101a33aea471dfde7d77b4a55dda29631dfaa33486088787afda826341da8cf5655d487964896cadf1759528b42d7e4c74891fb8add1e23b7d3dbe4 0001-bluez5-Set-Modalias-Class-Icon-properties.patch "