Bug 193792 - ports-mgmt/portlint: split 192633 - check for sorted USES
Summary: ports-mgmt/portlint: split 192633 - check for sorted USES
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: 2014-09-20 13:56 UTC by John Marino
Modified: 2017-04-23 09:17 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Marino freebsd_committer freebsd_triage 2014-09-20 13:56:32 UTC
(from danfe@)

I would also add to this request: portlint(1) should whine if USES (and similar knobs) values are not sorted.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-09-20 13:58:52 UTC
manually assign (typo in title prevented auto-assignment)
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2014-10-08 02:44:24 UTC
Implemented in my CVS repo pending the release of the next version.
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2014-10-08 23:41:39 UTC
Implemented in 2.15.5.
Comment 4 Matthias Andree freebsd_committer freebsd_triage 2014-10-10 23:41:32 UTC
This is useless if USES+= is used in the context of options. 
I am reopening this bug.

Please revisit the implementation as of 2.15.5 and do not warn about unavoidable unsorted stuff. (I think you may have to parse Makefile lines whether they are sorted in themselves, rather than the final variable contents.)

Sample port: sysutils/busybox.
Comment 5 Matthias Andree freebsd_committer freebsd_triage 2014-10-10 23:43:28 UTC
compiler:nestedfct gmake tar:bz2 perl5

Obviously the last two are not in order, but that's because the port does (this is with vim markup):

.if ${PORT_OPTIONS:MDOCS}
USES+=»·»·······perl5
USE_PERL5=»·····build
PORTDOCS=»······*
.endif
Comment 6 John Marino freebsd_committer freebsd_triage 2014-10-12 12:27:20 UTC
FWIW, I think think danfe@ only intended for the sort check to be performed per-line and not evaluate it's value at the end.
Comment 7 Joe Marcus Clarke freebsd_committer freebsd_triage 2014-10-13 05:54:17 UTC
Fixed in 2.15.6.
Comment 8 commit-hook freebsd_committer freebsd_triage 2014-10-13 05:54:39 UTC
A commit references this bug:

Author: marcus
Date: Mon Oct 13 05:53:57 UTC 2014
New revision: 370756
URL: https://svnweb.freebsd.org/changeset/ports/370756

Log:
  Update to 2.15.6.

  * Check to make sure each instance of USES is properly sorted.

  PR:		193792

Changes:
  head/ports-mgmt/portlint/Makefile
  head/ports-mgmt/portlint/src/portlint.pl
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2015-07-07 04:41:52 UTC
No, 2.6.15 still doesn't check sortedness of USE_PYTHON, like in this:

> USES=           python
> USE_PYTHON=     distutils autoplist
> NO_ARCH=        yes
Comment 10 Joe Marcus Clarke freebsd_committer freebsd_triage 2015-07-07 14:06:18 UTC
The original bug only referred to "USES" which should be fixed.  If there are macros in need of sorting, open new bugs.