Bug 263859 - ports-mgmt/portlint: BROKEN_* "has to appear earlier." is incorrect when depending on USES
Summary: ports-mgmt/portlint: BROKEN_* "has to appear earlier." is incorrect when depe...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Joe Marcus Clarke
URL: https://docs.freebsd.org/en/books/por...
Depends on:
Reported: 2022-05-08 06:34 UTC by Derek Schrock
Modified: 2022-05-15 21:00 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (marcus)


Note You need to log in before you can comment on or make changes to this bug.
Description Derek Schrock 2022-05-08 06:34:34 UTC
Using www/node14's Makefile as an example portlint incorrect reports that BROKEN_SSL should appear earlier (in the BROKEN/IGNORE/DEPRECATED messages - current location of ONLY_FOR_ARCHS in this case).

According to 15.5 [1] BROKEN_* and IGNORE_* should appear in USES if the vars apply to USES settings (ssl, php, etc...).

So in the case of www/node14 the BROKEN_SSL and BROKEN_SSL_REASON vars should be in the USES block.

[1] https://docs.freebsd.org/en/books/porters-handbook/order/#porting-order-broken
Comment 1 Joe Marcus Clarke freebsd_committer 2022-05-15 20:06:27 UTC
Hmmm, with latest portlint, I only see this:

WARN: Makefile: [15]: BROKEN messages should begin with a lowercase letter and end without a period.
WARN: Consider to set DEVELOPER=yes in /etc/make.conf
0 fatal errors and 2 warnings found.

That said, this still looks wrong, but I don't see the "has to be appear earlier" message.  Can you confirm what you're seeing?
Comment 2 Derek Schrock 2022-05-15 20:13:58 UTC
er sorry you need to move the BROKEN_* vars to the USES section (under USES=...) such that portlint prints the warning to move BROKE_SSL earlier.
Comment 3 Tatsuki Makino 2022-05-15 21:00:33 UTC
I don't understand the meaning of the Notes beyond comment#0 either, with DeepL and Bing translating it into Japanese.

I took the liberty of interpreting that unknowable meaning, and the result was, "BROKEN_* caused by USES or USE_* should be written in the file included by them."
In other words, instead of writing BROKEN under the USES and USE_* blocks in */*/Makefile, it should be written in Mk/bsd.*.mk or Mk/Uses/*.mk.