FS#55004 - makepkg --printsrcinfo" does not show "groups=base" for linux PKGBUILD
Attached to Project:
Pacman
Opened by Erich Eckner (deepthought) - Tuesday, 01 August 2017, 17:35 GMT
Last edited by Allan McRae (Allan) - Tuesday, 06 February 2018, 01:44 GMT
Opened by Erich Eckner (deepthought) - Tuesday, 01 August 2017, 17:35 GMT
Last edited by Allan McRae (Allan) - Tuesday, 06 February 2018, 01:44 GMT
|
Details
Description:
If I run "makepkg --printsrcinfo" in linux/repos/core-x86_64, there is no mention of "groups=base". The attached patch fixes this, without changing other behaviour. Additional info: * package version(s) pkgver=4.12.3 pkgrel=1 git revision b84448a5085a5e50a3bd09da090e594ff0ae025b Cheers, deep42thought |
This task depends upon
It assumes that the variables it `grep`s for are preceded by nothing other than whitespace.
However, this raises an interesting question. Currently, makepkg says the wrong thing when a variable follows a conditional. But even with Erich's proposed fix, this would still be wrong when the pkgbase is changed.
So, should makepkg err on the greedy side, and read more potential variables, or on the conservative side, and read fewer? If the former, maybe the regex should be extended to match anything. If the latter, maybe we should look for `if` conditionals and exclude them...
I'm inclined to think, if anything, we should be greedy since the practical purpose of .SRCINFO is allow e.g. AUR resolution, proper dependency ordering -- more, possibly extraneous information is better than missing information.
if [ $CARCH = 'x86_64' ]; then
depends+=(lib32-something)
elif [ $CARCH = 'i686' ]; then
depends+=(libsomething)
fi
Meanwhile, I'm in favour of making makepkg more "greedy" as eschwartz proposed.