Skip to content

Preview a distrobox.ini before assembling it (Roadmap: Needs External Help) #214

Description

@kacperpaczos

Describe your feature request below

The last of the Needs External Help assemble items: "Parse assemble .ini files and show confirmation pop-up with details." Right now picking an .ini for Assemble runs it straight away, and an assemble file can do a fair amount — it's not just an image and some packages, it can mount host paths, run as root, or fire hooks. Handing one to distrobox sight-unseen made me a little nervous, especially with files I hadn't written myself.

So before assembling, it now parses the file and shows what it's about to create, one row per box, and you Apply or Cancel:

assemble .ini preview

The bit I care about most is that it shows every key, not only the handful BoxBuddy has UI for. In the screenshot the work box lists its packages and init like you'd expect, but also pull = true and the additional_flags mounting a host path — both keys BoxBuddy has no field for, and exactly the sort of thing a preview that quietly hid them would make worse than useless. A confirmation is only worth having if it shows the whole truth.

I have it working and will open a PR. The parser is a plain function with unit tests, and I checked it agrees with what distrobox assemble actually creates from the same file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions