Opened 2 years ago

Last modified 11 days ago

#13427 new enhancement

Package Uninstall should run a Bash Script too

Reported by: AGMS Owned by: bonefish
Priority: normal Milestone: Unscheduled
Component: Servers/package_daemon Version: R1/Development
Keywords: .PackageInfo post-install-scripts uninstall Cc: agmsmith@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

There's a .PackageInfo keyword for "post-install-scripts" which comes in useful for making desktop icons (a symbolic link to the executable in the user's desktop folder) and other installation type activities. It would be useful to have a "pre-uninstall-scripts" entry too, so we can undo things that were done during install (like removing desktop icons).

Attachments (1)

PreUninstallTestPackages.zip (9.3 KB ) - added by AGMS 2 months ago.
Some test packages with the new pre-uninstall-script keyword, and compiled .hpkg files using an updated 2.1 package file format (won't be useable on the current 2.0 packaging system).

Download all attachments as: .zip

Change History (4)

comment:1 by Giova84, 2 years ago

I would like to point out that the post-install-script is also useful not only for making desktop icons and links (and more generally, to write files outside of the read-only directories), but also to display a notification after that a package has been installed, since currently, after that a package has been installed, there is a "total silence". As example I achieve this by using

notify --type important --group "Package Installation" --title "Done" --timeout 8 --icon /boot/system/apps/Installer "Wonderful package successfully installed"

http://funkyimg.com/i/2rhGY.png

(I filed this enhancement on ticket:13413)

Your suggestion for "pre-uninstall-scripts" would be also very useful, and I think of this since a long time, so "+1" for your idea.

Last edited 2 years ago by Giova84 (previous) (diff)

by AGMS, 2 months ago

Some test packages with the new pre-uninstall-script keyword, and compiled .hpkg files using an updated 2.1 package file format (won't be useable on the current 2.0 packaging system).

comment:3 by AGMS, 11 days ago

A backwards compatibility code patch so older Haiku can handle newer packages (same major version, different minor version) is at https://review.haiku-os.org/c/haiku/+/1714

Note: See TracTickets for help on using tickets.