You are not logged in.
I am updating a PKGBUILD which I also plan to add a message about a recommended configuration (namely, using system python instead of integrated). Is the best way really to bundle a whole .install script just to put an echo inside the post_install() function? Or should I put the echo inside package()?
Cheers,
Aᴀʀᴏɴ
Offline
If you want the message to be echoed after a package is installed, that's precisely what post_install is for. If you put an echo command in package(), it will - as the name of the function implies - only print out when the software is packaged ... not when built packages are installed.
Facetiousness aside: this question only comes from an assumption that others will build/install in one fell swoop (i.e., use makepkg -i). That is neither a safe assumption, or one that should be made in writing PKGBUILDs.
Last edited by Trilby (2023-11-19 20:43:04)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Do I need to package in a separate .install file just for the post_install function?
Cheers,
Aᴀʀᴏɴ
Offline
Yes. This file is bundled with the package itself and will be sourced by pacman later. It is not sourced by makepkg.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ah, that makes a lot of sense. Thanks.
Cheers,
Aᴀʀᴏɴ
Offline