Bug 221507 - ports-mgmt/portlint: Wrong warnings: Unused option when it is used in pkg-plist; Detects absolute path in the regexp
Summary: ports-mgmt/portlint: Wrong warnings: Unused option when it is used in pkg-pli...
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-08-14 06:24 UTC by Yuri Victorovich
Modified: 2017-08-15 12:48 UTC (History)
0 users

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


Attachments
port (testcase) (53.29 KB, text/plain)
2017-08-14 06:24 UTC, Yuri Victorovich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2017-08-14 06:24:56 UTC
Created attachment 185390 [details]
port (testcase)

On the attached testcase portlint prints these two errors, both of which are wrong:
> # portlint
> WARN: Makefile: HIGHLIGHT is listed in OPTIONS_DEFINE, but no PORT_OPTIONS:MHIGHLIGHT appears.
> WARN: Makefile: possible use of absolute pathname "/g}".

When the port has OPTIONS_SUB=yes and this option is in pkg-plist and in the option helper target, these *are* the uses of the option.
The second error problem is self-explanatory.
Comment 1 Joe Marcus Clarke freebsd_committer 2017-08-14 17:26:03 UTC
Fixes committed to my repo pending the next release.
Comment 2 commit-hook freebsd_committer 2017-08-15 12:44:01 UTC
A commit references this bug:

Author: marcus
Date: Tue Aug 15 12:43:14 UTC 2017
New revision: 447981
URL: https://svnweb.freebsd.org/changeset/ports/447981

Log:
  Update to 2.17.12.

  * Don't check for absolute paths inside make variables [1]
  * Check pkg-plist for use of OPTIONS [1]
  * Fix an issue with line number offsets [2]
  * Don't alert on double-dollar (VARIABLE) [3]
  * Allow BROKEN, IGNORE, DEPRECATED to appear before the *_DEPENDS block [4]
  * Check that manpages are not installed into share/man [5]
  * Check for a space anywhere between a variable and its value [6]

  PR:		221507 [1]
  		221291 [2]
  		221397 [3]
  		221377 [4]
  		221455 [5]
  		221219 [6]
  Submitted by:	Dmitri Goutnik <dg@syrec.org> [4]

Changes:
  head/ports-mgmt/portlint/Makefile
  head/ports-mgmt/portlint/src/portlint.pl
Comment 3 Joe Marcus Clarke freebsd_committer 2017-08-15 12:48:05 UTC
Fixed in 2.17.12.