Bug 218260 - ports-mgmt/portlint: portlint shouldn't complain about unused option when it is actually used
Summary: ports-mgmt/portlint: portlint shouldn't complain about unused option when it ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Joe Marcus Clarke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-31 15:53 UTC by Yuri Victorovich
Modified: 2017-04-21 19:51 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2017-03-31 15:53:32 UTC
For one port I defined the option BUNDLED_NACL which is used:
> BUNDLED_NACL_MAKE_ENV_OFF+=     SODIUM_INSTALL=system
> BUNDLED_NACL_LIB_DEPENDS_OFF=   libsodium.so:security/libsodium

Yes, portlint complains:

> WARN: Makefile: BUNDLED_NACL is listed in OPTIONS_DEFINE, but no PORT_OPTIONS:MBUNDLED_NACL appears.

It should check all uses, not just PORT_OPTIONS:MBUNDLED_NACL.
Comment 1 Walter Schwarzenfeld freebsd_triage 2017-03-31 16:06:47 UTC
I am not really clear what you want to do, but I think the right syntax is:

BUNDLED_NACL_OFF=	MAKE_ENV+=SODIUM_INSTALL=system \
					        LIB_DEPENDS=libsodium.so:securtiy/libsodium
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2017-03-31 16:09:57 UTC
Yes, BUNDLED_NACL_OFF= also works, but the syntax that I used ({opt}_XXX_OFF) is also supported. I think portlint should validate options the way they are supported.
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2017-04-07 19:59:05 UTC
Fixed in my private repo pending the next release.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-04-21 19:51:47 UTC
A commit references this bug:

Author: marcus
Date: Fri Apr 21 19:50:59 UTC 2017
New revision: 439128
URL: https://svnweb.freebsd.org/changeset/ports/439128

Log:
  Update to 2.17.8.

  * Check for use of OPT_XXX_OFF syntax to prevent false incorrect option
    usage assertions. [1]
  * Remove now-obsolete warning about using :LU operators with make(1). [2]
  * Fix the regex to prevent direct command use from hittin on lines
    like FOO_USES=... [3]

  PR:		218260 [1]
  		218325 [2]
  		218672 [3]
  Submitted by:	jrm [2]
  Reported by:	rezny [2]

Changes:
  head/ports-mgmt/portlint/Makefile
  head/ports-mgmt/portlint/src/portlint.pl
Comment 5 Joe Marcus Clarke freebsd_committer freebsd_triage 2017-04-21 19:51:59 UTC
Committed to 2.17.8.