From nobody@FreeBSD.org  Mon Nov 11 15:46:34 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id CAB57795
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Nov 2013 15:46:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id B95212119
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Nov 2013 15:46:34 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rABFkY16050970
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Nov 2013 15:46:34 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rABFkYvm050967;
	Mon, 11 Nov 2013 15:46:34 GMT
	(envelope-from nobody)
Message-Id: <201311111546.rABFkYvm050967@oldred.freebsd.org>
Date: Mon, 11 Nov 2013 15:46:34 GMT
From: Mark Felder <feld@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ports-mgmt/portlint: feature request
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183864
>Category:       ports
>Synopsis:       ports-mgmt/portlint: feature request
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    marcus
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 11 15:50:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Fri Nov 29 15:20:01 UTC 2013
>Originator:     Mark Felder
>Release:        
>Organization:
>Environment:
>Description:
I'm slowly amassing a list of things that should really be picked up by portlint. Here's what I have noted so far:

unnecessary double tab indentation
plist entries ending in /
${INSTALL}, ${MKDIR}, etc ending in /
@${INSTALL}  (install getting silenced)
${PREFIX}/man/man# should be ${MAN#PREFIX} (maybe not; seems broken since STAGE)
USES superceding old declaration. ex: USES= perl5  vs USE_PERL5=yes
pkg-descr whitespace at EOL
-ACNC is not the default, but should be
PTHREAD_CFLAGS and PTHREAD_LIBS should be flagged
OPTIONS_DEFINE that aren't used or OPTIONS_DEFAULT that don't exist should error
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Nov 12 02:47:30 UTC 2013 
Responsible-Changed-Why:  
ports PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183864 
Responsible-Changed-From-To: freebsd-ports-bugs->marcus 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Nov 12 02:47:46 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183864 
State-Changed-From-To: open->feedback 
State-Changed-By: marcus 
State-Changed-When: Thu Nov 28 18:35:28 UTC 2013 
State-Changed-Why:  
Hey, Mark.  I'm trying to get a handle on these specific requests.  What 
would really help are some example ports that exhibit the problems you're 
describing so I can see the issues myself and/or test possible solutions. 

In particular, the MAN comment is a bit nebulous.  And what do you mean by 
unnecessary double-tab indention?  Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183864 

From: Mark Felder <feld@feld.me>
To: bug-followup@FreeBSD.org,
 Mark Felder <feld@FreeBSD.org>
Cc:  
Subject: Re: ports/183864: ports-mgmt/portlint: feature request
Date: Fri, 29 Nov 2013 09:12:25 -0600

 Hi Marcus,
 
 I=92ll try to explain these:
 
 > unnecessary double tab indentation
 
 The Makefile should not have multiple tabs after a variable.
 
 example:  USES=3D	perl5
 
 There should only ever be one tab after the =3D
 
 > plist entries ending in /
 
 There is never a reason for entries in the pkg-plist to end with a /. =
 This mostly applies to @dirrm or @dirrmtry entries. There are ports in =
 the tree that do have this. You can find them with this:=20
 
 find /usr/ports -name pkg-plist -exec egrep "@dir.*/$" {} \;
 
 > ${INSTALL}, ${MKDIR}, etc ending in /
 
 Same idea as above. These entries in Makefiles should not end in /
 
 > @${INSTALL} (install getting silenced)
 
 INSTALL should never be silenced; these actions should always be shown =
 to the user.
 
 > ${PREFIX}/man/man# should be ${MAN#PREFIX} (maybe not; seems broken =
 since STAGE)
 
 ${MAN#PREFIX} was the correct way to handle man pages so someone could =
 actually define a different PREFIX for all man pages. Last I checked it =
 doesn=92t work with STAGE, which is probably a bug that I need to =
 report.
 
 > USES superceding old declaration. ex: USES=3D perl5 vs USE_PERL5=3Dyes
 
 Fairly self explanatory. We should update portlint to identify these old =
 USE_* when we migration things to USES
 
 > pkg-descr whitespace at EOL
 
 Whitespace characters at end of lines in pkg-descr should be detected
 
 > -ACNC is not the default, but should be
 
 Default portlint operation should invoke -ACNC which is much more useful =
 than the default operation
 
 > PTHREAD_CFLAGS and PTHREAD_LIBS should be flagged
 
 These have been dead since FreeBSD 6 I believe. They should not be =
 permitted in Makefiles.
 
 > OPTIONS_DEFINE that aren't used or OPTIONS_DEFAULT that don't exist =
 should error
 
 If OPTIONS_DEFINE or OPTIONS_DEFAULT declares things that aren=92t used =
 it should throw an error. It could be due to a spelling error or perhaps =
 the person working on the port forgot to actually add its functionality =
 in the form of:
 
 .if ${PORT_OPTIONS:MFOO}
 
 or
 
 FOO_USES=3D, FOO_BUILD_DEPENDS=3D, FOO_LIB_DEPENDS, etc.
 
 
 hope that helps
 
>Unformatted:
