Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Unknown method: SetInteractive for agama questions mode non-interactive (#709) #712

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

mvidner
Copy link
Contributor

@mvidner mvidner commented Aug 22, 2023

Problem

See #709:

When I use our CLI, agama questions mode non-interactive
It calls a org.opensuse.Agama.Questions1.SetInteractive method on /org/opensuse/Agama/Questions1 but the actual API is an Interactive property.

Solution

Fix the generated proxies to include a dbus_proxy(property) attribute.

(other proxies.rs files either do not have writable properties or already have this fix applied)

An upstream fix for https://github.com/dbus2/zbus will follow.

Testing

Tested manually:

567764a093c4:/checkout # rust/target/debug/agama questions mode non-interactive
Failed to set mode for answering questions.

Caused by:
    org.freedesktop.DBus.Error.UnknownMethod: Unknown method 'SetInteractive'
567764a093c4:/checkout # [apply this fix]
567764a093c4:/checkout # (cd rust; cargo b)
   Compiling agama-lib v1.0.0 (/checkout/rust/agama-lib)
   Compiling agama-cli v1.0.0 (/checkout/rust/agama-cli)
   Compiling agama-dbus-server v0.1.0 (/checkout/rust/agama-dbus-server)
    Finished dev [unoptimized + debuginfo] target(s) in 13.53s
567764a093c4:/checkout # rust/target/debug/agama questions mode non-interactive
11:47:52 [INFO] interactive value unchanged - false

Screenshots

See above.

…ractive` (#709)

We want to access Interactive, a writable property.

zbus-xmlgen generates a proxy for setting a writable property but
forgets to mark it as a property, generating a method call instead
@mvidner
Copy link
Contributor Author

mvidner commented Aug 22, 2023

The NetworkManager proxies fixed here are not used in our client code. I checked with rg -F .set_ rust/ and eyeball-diffed the resulting agama-lib/src/network/ matches.

@mvidner mvidner merged commit e60dee0 into master Aug 22, 2023
10 checks passed
@mvidner mvidner deleted the access-writable-properties branch August 22, 2023 14:17
mvidner added a commit to mvidner/zbus that referenced this pull request Aug 23, 2023
The `#[dbus_proxy(property)]` attribute needs to be present also at the
`set_foo` function, otherwise the proxy will call a `SetFoo` method instead of
`Set`ting the `Foo` property.

Example:
agama-project/agama#712
@imobachgs imobachgs mentioned this pull request Sep 26, 2023
mvidner added a commit that referenced this pull request Dec 5, 2023
Same issue as in #712:

zbus-xmlgen generates a proxy for setting a writable property but
forgets to mark it as a property, generating a method call instead

(I fixed zbus-xmlgen in August but they haven't released a crate since June)
mvidner added a commit that referenced this pull request Jan 19, 2024
Same issue as in #712:

zbus-xmlgen generates a proxy for setting a writable property but
forgets to mark it as a property, generating a method call instead

(I fixed zbus-xmlgen in August but they haven't released a crate since June)
mvidner added a commit that referenced this pull request Feb 1, 2024
Same issue as in #712:

zbus-xmlgen generates a proxy for setting a writable property but
forgets to mark it as a property, generating a method call instead

(I fixed zbus-xmlgen in August but they haven't released a crate since June)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants