FS#43502 - Usage of undocumented subroutines in PKGBUILDs
Attached to Project:
Arch Linux
Opened by Max (silverhammermba) - Monday, 19 January 2015, 03:36 GMT
Last edited by David Runge (dvzrv) - Friday, 17 January 2020, 12:44 GMT
Opened by Max (silverhammermba) - Monday, 19 January 2015, 03:36 GMT
Last edited by David Runge (dvzrv) - Friday, 17 January 2020, 12:44 GMT
|
Details
Many PKGBUILDs show packaging progress by using message
subroutines defined by makepkg e.g. msg, msg2, warning.
These subroutines are undocumented and - according to at
least one
[[https://wiki.archlinux.org/index.php?title=Creating_packages&diff=356746&oldid=340026|wiki
editor]] - are only intended for internal use by makepkg.
Quite a lot of community PKGBUILDs use these subroutines and
even a few core and extra ones do too. As I see it, either
these message subroutines should be well-documented and
encouraged or they should be patched out of official
PKGBUILDs.
To find all PKGBUILDs that use them, run: grep -Rl '^\s\+\(msg\|msg2\|warning\|error\|plain\) ' /var/abs/*/*/PKGBUILD |
This task depends upon
Closed by David Runge (dvzrv)
Friday, 17 January 2020, 12:44 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in Packaging Guidelines and a TODO.
Friday, 17 January 2020, 12:44 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in Packaging Guidelines and a TODO.
What should be done next, create a bug report per package?
[1]: https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/grub#n86
[2]: https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/refind-efi#n87
Thanks in advance.
If you *absolutely* need markers to delineate regions of output, then just use printf (or echo) as you usually would in any other script.
https://wiki.archlinux.org/index.php/PKGBUILD#install
Then someone please create a todo list to clean related PKGBUILDs.
[1] https://wiki.archlinux.org/index.php/Arch_package_guidelines#Package_etiquette
[2] https://www.archlinux.org/todo/remove-usage-of-makepkg-subroutines-from-pkgbuilds/