Skip to content

Add notice fields to the metadata - #177

Merged
Max13245 merged 8 commits into
pack-it:mainfrom
Mrpanda-Developer:feature/comments
Sep 7, 2026
Merged

Add notice fields to the metadata#177
Max13245 merged 8 commits into
pack-it:mainfrom
Mrpanda-Developer:feature/comments

Conversation

@Mrpanda-Developer

Copy link
Copy Markdown
Contributor

This feature adds a optional "install_message" before installing the package. In case of certain quirks with certain packages.

@BraveChicken1

Copy link
Copy Markdown
Contributor

I think this change is a good idea, but I'm not sure if we should have two different fields in the package.toml file and targets.toml file. I think a message is mostly version specific, so having the field only in the targets.toml file is probably enough.

There are also two other things that would probably be nice to add:

  • This field is now only for messages before an install, it would probably be nice to have two options: preinstall_notice and postinstall_notice.
  • The notices probably need to be different on different platforms, so adding the field to both PackageVersionMeta and PackageTarget would give us the option to specify it globally for a version, or only for a specific target.

One final remark, these messages should probably be printed in the Installer::install_package function instead, next to the calls to execute_preinstall and execute_postinstall.

@Max13245

Max13245 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

I'm not sure if that many fields for comments is necessary, it might be. We could specify in the comment what it is meant for. Maybe it's nice to first only implement it more generally on the install. If we notice that we have a lot comments and need them to be more specific we can always add this functionality later. I do think it's good to already differentiate between targets though, because they are often very different.

@BraveChicken1

Copy link
Copy Markdown
Contributor

My idea was to replace the two fields that are added in this PR, by a preinstall_notice and postinstall_notice field, to differentiate between the moment the message should be shown to the user.
For ca-certificates the postinstall_notice could be useful: it could show the user that the cert.pem file will be generated from the certificates that are installed in the OS.

@Max13245

Max13245 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Ahh, so with pre and postinstall you just mean before and after the installation? I thought you meant you wanted to add something like this for all scripts (pre and postinstall being examples of script names), which seemed a bit overkill :)

@BraveChicken1

Copy link
Copy Markdown
Contributor

Yes, exactly. I think a separation like that is useful, and the field name explains what it does clearly.

@Mrpanda-Developer

Copy link
Copy Markdown
Contributor Author

Hey, those suggestions sound good to me, will implement them soon!

@Mrpanda-Developer

Copy link
Copy Markdown
Contributor Author

I looked at your suggestions and implemented them, could you please give me some feedback on the changes wether they are good or not?

Comment thread docs/metadata.md Outdated
Comment thread src/installer/installer.rs Outdated
@BraveChicken1 BraveChicken1 changed the title add comments feature in the metadata Add notice fields to the metadata Sep 5, 2026

@BraveChicken1 BraveChicken1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot a few changes, see the suggestions below.

Comment thread docs/metadata.md Outdated
Comment thread src/installer/installer.rs Outdated
Comment thread src/installer/installer.rs Outdated
Comment thread src/installer/installer.rs Outdated
@Mrpanda-Developer

Copy link
Copy Markdown
Contributor Author

whoops, yeah just saw. Should be fixed now.

Mrpanda-Developer and others added 8 commits September 7, 2026 21:39
Co-authored-by: Frank <46161394+BraveChicken1@users.noreply.github.com>
Co-authored-by: Frank <46161394+BraveChicken1@users.noreply.github.com>
Co-authored-by: Frank <46161394+BraveChicken1@users.noreply.github.com>
Co-authored-by: Frank <46161394+BraveChicken1@users.noreply.github.com>
@Max13245
Max13245 merged commit 00e581a into pack-it:main Sep 7, 2026
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.

3 participants