tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: checksum argmax fix #2
Am 08.08.2024 um 09:59 schrieb Jonathan Perkin:
> * On 2024-08-08 at 07:34 BST, Thomas Klausner wrote:
>> However, pkglint is quite unhappy. The first three happen for every
>> package, the last one for grafana if I follow your suggestion above
>> (making it += will fix this one).
>>
>> ERROR: ../../mk/checksum/checksum.mk:39: Assignment modifiers like ":=" must not be used at all.
>> ERROR: ../../mk/checksum/checksum.mk:96: Assignment modifiers like ":=" must not be used at all.
>> ERROR: ../../mk/checksum/checksum.mk:129: Assignment modifiers like ":=" must not be used at all.
>> WARN: Makefile:16: Assignments to "DISTINFO_ARGMAX_REQD" should use "+=", not "=".
>
> Yeh I think we'll need pkglint fixes for these.
>
> Using ::= is the only way this is going to work, so while it shouldn't
> be used in other places, it has to be used here (unless there is some
> other esoteric bmake feature I should be using instead).
I loosened the check, allowing infrastructure files to use the "::="
modifier.
> And I assume that it treats all _REQD as needing to be lists. I'm not
> sure I want to change the name of the variable as I think it accurately
> depicts what it does, unless there are any better suggestions?
For other REQD variables such as GCC_REQD, there may be multiple
independent sources, and the highest one wins. From my understanding,
this also makes sense for DISTINFO_ARGMAX_REQD, just in case a makefile
fragment requires it as well.
If DISTINFO_ARGMAX_REQD has more than a single word, the highest of its
values can be determined like this:
DISTINFO_ARGMAX!= \
printf '%s\n' ${DISTINFO_ARGMAX_REQD} | LC_ALL=C sort -nr | sed 1q
The same effect would work by using ${DISTINFO_ARGMAX_REQD:On:[1]}, but
the ':On' modifier is not available in bmake-20200524 and NetBSD 9, as
it was added in July 2021 for NetBSD 10.
Roland
Home |
Main Index |
Thread Index |
Old Index