Bug 194759 - ports-mgmt/portlint: false positive: possible direct use of command "install" found
Summary: ports-mgmt/portlint: false positive: possible direct use of command "install"...
Status: Closed FIXED
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:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-02 15:07 UTC by Gerald Pfeifer
Modified: 2015-02-04 17:17 UTC (History)
0 users

See Also:


Attachments
Patch againts portlint/src/portlint.pl (493 bytes, patch)
2014-11-02 15:07 UTC, Gerald Pfeifer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer freebsd_committer freebsd_triage 2014-11-02 15:07:55 UTC
Created attachment 148933 [details]
Patch againts portlint/src/portlint.pl

Running portlint -C on emulators/wine-devel, I get the following:

  WARN: Makefile: [0]: possible direct use of command "install" found. use ${INSTALL_foobaa} instead.

for

  pre-configure:
        cd ${WRKSRC} && ${TAR} xf ${DISTDIR}/${COMP_DIST} --strip-components 1
        cd ${WRKSRC} && ${MAKE_CMD} -C ./patches DESTDIR=${WRKSRC} install


The attached patch avoids this by preventing this warning when 
the string "install" appears at the end of a line, since that
is definitely not the case we want to warn about.

Alternately you could use "\${MAKE_CMD}.*install" as a pattern.


If you approve, I can commit this myself (bumping the minor version).
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-02 15:07:55 UTC
Auto-assigned to maintainer marcus@FreeBSD.org
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2014-11-03 05:48:26 UTC
Yeah, I'd rather something like ${MAKE_CMD}.*\binstall\b to be safer.  Using "install" by itself completely defeats the check we want here.
Comment 3 Gerald Pfeifer freebsd_committer freebsd_triage 2014-11-03 13:47:33 UTC
(In reply to Joe Marcus Clarke from comment #2)
> Yeah, I'd rather something like ${MAKE_CMD}.*\binstall\b to be safer.  Using
> "install" by itself completely defeats the check we want here.

Agreed on "install".  Note that my patch has "install$" -- and
the string "install" at the end of a line is not what we want to
catch, is it?
Comment 4 Joe Marcus Clarke freebsd_committer freebsd_triage 2015-01-05 16:50:48 UTC
Committed to my CVS repo pending the next release.
Comment 5 Joe Marcus Clarke freebsd_committer freebsd_triage 2015-02-04 17:10:35 UTC
Fixed!