agama-project / agama

A service-based Linux installer
https://agama-project.github.io/
GNU General Public License v2.0
143 stars 43 forks source link

Questions with details #560

Closed joseivanlopez closed 6 months ago

joseivanlopez commented 1 year ago

Right now there are two D-Bus interfaces for questions in Agama: org.opensuse.Agama.Questions1.Generic and org.opensuse.Agama.Questions1.LuksActivation. The first one is for very generic questions providing a text and a set of options for answering the question. The other one is very specific to ask for the LUKS encryption password.

Sometimes it is needed to send extra information for a question. For example, the details of a command failure when there is a storage commit error. The current generic iface does not allow to indicate that extra information. Note that having that extra info in a separate D-Bus property is important to allow clients presenting it in a proper way:

There was an error perfoming the following action: Reading partition /dev/vdd2.

command '/usr/bin/udevadm info '/dev/vdd2'' failed:

stderr:
Unknown device "/dev/vdd2": No such device

exit code:
1

Do you want to continue?

[No] [Yes]
joseivanlopez commented 6 months ago

We have changed the D-Bus interfaces for questions and now it uses composition. The use case exposed here can be covered with the current approach.