Bug 223498 - ports-mgmt/portlint: Don't warn about INSTALLS_ICONS when the project isn't GTK+
Summary: ports-mgmt/portlint: Don't warn about INSTALLS_ICONS when the project isn't GTK+
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-11-07 18:51 UTC by Yuri Victorovich
Modified: 2017-12-28 23:47 UTC (History)
3 users (show)

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


Attachments
Patch to suppress INSTALLS_ICONS warning for Qt5 ports (1.89 KB, patch)
2017-11-17 12:26 UTC, Adriaan de Groot
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2017-11-07 18:51:11 UTC
Currently, it always warns:
> WARN: /usr/ports/multimedia/simplescreenrecorder/pkg-plist: [62]: installing icons, please define INSTALLS_ICONS as appropriate

Handbook says that it is only needed for GTK+ ports: https://www.freebsd.org/doc/en/books/porters-handbook/using-gnome.html

You should print the above warning only for GTK+ ports, but warn when INSTALLS_ICONS is set for non-GTK+ ports.
Comment 1 Yuri Victorovich freebsd_committer 2017-11-07 19:26:28 UTC
Another thing is that the warning is printed a  lot of times. One time is enough.
Comment 2 Adriaan de Groot freebsd_committer 2017-11-17 12:26:21 UTC
Created attachment 188072 [details]
Patch to suppress INSTALLS_ICONS warning for Qt5 ports

This patch adds a `needs_installs_icons()` which states whether a port needs INSTALLS_ICONS when there are icons present. It's pessimistic, to preserve existing warnings and only suppress the warning for Qt5-based applications.

Additionally, checks for INSTALLS_ICONS when it isn't needed (i.e. Qt5).

The `needs_installs_icons()` function could be massaged to really check only for GNOME ports, but this seems simpler.
Comment 3 Adriaan de Groot freebsd_committer 2017-11-17 12:27:25 UTC
Adding tcberner@ (mentor for me and yuri) and rakuco@ (mentor for me).
Comment 4 Tobias C. Berner freebsd_committer 2017-11-17 19:23:27 UTC
This sounds like a good idea.
Comment 5 Joe Marcus Clarke freebsd_committer 2017-12-28 22:39:36 UTC
Fix committed to my repo pending the next release.
Comment 6 Joe Marcus Clarke freebsd_committer 2017-12-28 23:47:30 UTC
Committed, thanks!