Bug 192161 - ports-mgmt/portlint: 100-char patch filename rule incorrectly includes path
Summary: ports-mgmt/portlint: 100-char patch filename rule incorrectly includes path
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
Depends on:
Reported: 2014-07-27 11:19 UTC by John Marino
Modified: 2014-07-28 13:22 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description John Marino freebsd_committer 2014-07-27 11:19:21 UTC
Revision 361618 added this rule among others: 
* Check to make sure patch file names contain no more than 100 characters. 

I believe the rule wants the filename of the patch to be less than 100 characters, but the check is counting the entire path.

For example,
> cd /usr/ports/deskutils/cairo-dock-plugins
> portlint
(only warnings seen)

but then when the ports tree is in a non-standard location:

root@Niner:~ # cd /home/marino/svnhub/freebsd-ports/deskutils/cairo-dock-plugins/
root@Niner:/home/marino/svnhub/freebsd-ports/deskutils/cairo-dock-plugins # portlint
WARN: Makefile: TERMINAL appears in PORT_OPTIONS:M, but is not listed in OPTIONS_DEFINE.
WARN: Makefile: Consider adding support for a NLS knob to conditionally disablegettext support.
WARN: Makefile: Consider defining LICENSE.
FATAL: /usr/home/marino/svnhub/freebsd-ports/deskutils/cairo-dock-plugins/files/
patch-Dbus__interfaces__vala__CMakeLists.txt: make sure patch file names contain
 no more than 100 characters.
1 fatal error and 3 warnings found.

So that's why I think the rule is looking at the length of the entire path, and not the length of just the filename of the patch.  I've seen this on a few ports now.
Comment 1 John Marino freebsd_committer 2014-07-27 11:20:19 UTC
Hi Marcus, can you verify what I'm seeing in portlint is a bug?
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-07-27 11:38:02 UTC
I reported this to marcus@ cc demon@ then forwarded to portmgr@ with no response, so including original email below for reference to a second reproduction:


make sure patch file names contain no more than 100 characters.

is this (including characters in path-to-file) expected?

`svn status` is:

[/usr/home/koobs/repos/freebsd/ports/devel/py-setuptools] ss
M       Makefile
M       distinfo
A       files/patch-setuptools__command__install_egg_info.py
D       files/patch-setuptools_command_install_egg_info.py
Comment 3 Joe Marcus Clarke freebsd_committer 2014-07-28 06:37:20 UTC
Can you try this and see if it helps:

Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2014-07-28 06:59:11 UTC
Works for me on patch file reported in comment 2, thanks Marcus! :)

Also, ports-mgmt/portlint needs a LICENSE update (BSD -> BSD[X]CLAUSE)
Comment 5 John Marino freebsd_committer 2014-07-28 07:05:00 UTC
same here, it now works for the cairo-dock example.
Comment 6 commit-hook freebsd_committer 2014-07-28 13:21:30 UTC
A commit references this bug:

Author: marcus
Date: Mon Jul 28 13:21:07 UTC 2014
New revision: 363150
URL: http://svnweb.freebsd.org/changeset/ports/363150

  Update to 2.15.4.

  Use File::Basename so that only the patch filename is checked for the 100
  character limit.

  PR:		192161

Comment 7 Joe Marcus Clarke freebsd_committer 2014-07-28 13:22:18 UTC
Fix has been committed.  Thanks for the report!