Fails to login when Kwallet is default keyring
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### Bug Description
When Kwallet is default keyring, snapcraft throws an error that `python-dbus` is not installed. I assume, therefore, that `python-dbus` is not included in the snap and therefore it is unable to communicate with dbus in the system.
### To Reproduce
Install snapcraft `snap install snapcraft` on Kubuntu or Ubuntu Studio
Attempt `snapcraft login` or any other item where snapcraft requires access to the system keyring
Most of the time* it will fail with:
```
snapcraft internal error: RuntimeError('python-dbus not installed')
```
*I say most of the time because this is inconsistent between installations, but this happened on a clean install I did to alleviate any error on my part. I have a separate upgraded install where it worked, but this is reproducible 100% of the time on the clean install.
### Environment
Running on Ubuntu Studio 24.10, but this has happened under 24.04 LTS as well.
### snapcraft.yaml
```yaml
No relevant snapcraft.yaml as this happens when merely accessing the keyring via `snapcraft login` or `snapcraft upload` or the like.
```
### Relevant log output
```shell
2024-10-31 09:26:56.195 Starting snapcraft, version 8.4.4
2024-10-31 09:26:56.195 Log verbosity level set to BRIEF
2024-10-31 09:26:56.195 Preparing application...
2024-10-31 09:26:56.195 Configuring application...
2024-10-31 09:26:56.196 Setting up ConfigService
2024-10-31 09:26:56.229 Build plan: platform=None, build_for=None
2024-10-31 09:26:56.229 Running snapcraft login on host
2024-10-31 09:26:56.230 snapcraft internal error: RuntimeError('python-dbus not installed')
2024-10-31 09:26:56.232 Traceback (most recent call last):
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/craft_application/application.py", line 568, in run
2024-10-31 09:26:56.232 return_code = self._run_inner()
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/application.py", line 215, in _run_inner
2024-10-31 09:26:56.232 return_code = super()._run_inner()
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/craft_application/application.py", line 549, in _run_inner
2024-10-31 09:26:56.232 return_code = dispatcher.run() or os.EX_OK
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/craft_cli/dispatcher.py", line 487, in run
2024-10-31 09:26:56.232 return self._loaded_command.run(self._parsed_command_args)
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/commands/account.py", line 114, in run
2024-10-31 09:26:56.232 store.StoreClientCLI().login()
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/store/client.py", line 179, in __init__
2024-10-31 09:26:56.232 self.store_client = get_client(ephemeral=ephemeral)
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/store/client.py", line 161, in get_client
2024-10-31 09:26:56.232 client = craft_store.UbuntuOneStoreClient(
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/craft_store/ubuntu_one_store_client.py", line 46, in __init__
2024-10-31 09:26:56.232 super().__init__(
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/craft_store/base_client.py", line 78, in __init__
2024-10-31 09:26:56.232 self._auth = Auth(
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/craft_store/auth.py", line 189, in __init__
2024-10-31 09:26:56.232 self._keyring = keyring.get_keyring()
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/keyring/core.py", line 33, in get_keyring
2024-10-31 09:26:56.232 init_backend()
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/keyring/core.py", line 84, in init_backend
2024-10-31 09:26:56.232 set_keyring(_detect_backend(limit))
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/keyring/core.py", line 99, in _detect_backend
2024-10-31 09:26:56.232 or load_config()
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/keyring/core.py", line 184, in load_config
2024-10-31 09:26:56.232 return load_keyring(keyring_name)
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/keyring/core.py", line 137, in load_keyring
2024-10-31 09:26:56.232 class_.priority
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/jaraco/classes/properties.py", line 202, in __get__
2024-10-31 09:26:56.232 return self.fget.__get__(None, owner)()
2024-10-31 09:26:56.232 File "/snap/snapcraft/12961/lib/python3.10/site-packages/keyring/backends/kwallet.py", line 43, in priority
2024-10-31 09:26:56.232 raise RuntimeError('python-dbus not installed')
2024-10-31 09:26:56.232 RuntimeError: python-dbus not installed
2024-10-31 09:26:56.232 Full execution log: '/home/erich/.local/state/snapcraft/log/snapcraft-20241031-092656.194389.log'
```
### Additional context
I believe this can be alleviated by simply including `python-dbus` in the snapcraft snap, but this is theory.
Evaluation history
No evaluation history available.