You are not logged in.
Pages: 1
How much should the PKGBUILD script and the PKG.install script do for the user.
For example, my package depends on mysql and needs to create a database and tables. Should the post_install take care of this or should I force the user to do it.
If I take care of it what is the standard practice if someone removes my package? Should I drop the database?
If I leave the database when installing next time I am in a bit of unknown state and would like to error. It doesn't seem like post_install can revert.
Thanks.
Offline
Add a message to the post_install scriptlet telling them what they need to do to set up the database. Likewise, remind the user that they will need to clean up the database by themselves after removing the package by putting a message in post_remove.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Instead of describing the exact database tables required in post_install, you can add the database layout as an SQL file below /usr/shared/doc/, you can also add a small database creation script as an example.
Last edited by progandy (2015-11-08 12:27:51)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Thanks,
Yep, I was never going to list the tables. There is three commands that a user must run that creates the databases. Or I may just print a llink to the bareos documentation that describes what to do.
http://doc.bareos.org/master/html/bareo … l#QQ2-1-42
Thanks.
Offline
Pages: 1