When working on some ports earlier, after some sanity checking, I came across a false positive regarding the usage of desktop-file-utils. The confusing part was on the one hand portlint(1) complaining about the absence of `USES=desktop-file-utils`, while the other in the stage-qa target told me that it was unnecessary after the fact of adding it. The culprit in portlint(1) appears to be here[0]. Just the presence of an `.desktop` file trips the check up without determining whether a MimeType is actually specified (seen in Scripts/qa.sh[1]; we should follow this behaviour as currently this is an incorrect assumption of portlint(1) and a little confusing to consumers). Unfortunately my perl-foo is quite rusty, ergo this problem report. :) [0] https://cgit.freebsd.org/ports/tree/ports-mgmt/portlint/src/portlint.pl#n813 [1] https://cgit.freebsd.org/ports/tree/Mk/Scripts/qa.sh#n222
Thanks for the report. This is a tricky one since portlint operates on the build infra rather than the package data itself. That said, I've softened the error to: &perror("WARN", $file, $., "this port installs .desktop files. ". "If the .desktop file(s) installed contain ``MimeType='', ". "you must add `desktop-file-utils` to USES."); What do you think?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=045f9995fb3624885bdae850d12eca43f7625732 commit 045f9995fb3624885bdae850d12eca43f7625732 Author: Joe Marcus Clarke <marcus@FreeBSD.org> AuthorDate: 2023-11-13 19:02:19 +0000 Commit: Joe Marcus Clarke <marcus@FreeBSD.org> CommitDate: 2023-11-13 19:02:19 +0000 ports-mgmt/portlint: Update to 2.21.0 * Soften the desktop-file-utils message [1] * Avoid a bogus error on ports that append to DISTFILES. [2] * Colorize output for warnings and errors. [3] PR: 271623 [1] 268681 [2] 274981 [3] Inspired by: yuri [3] ports-mgmt/portlint/Makefile | 2 +- ports-mgmt/portlint/src/portlint.pl | 37 +++++++++++++++++++++++++------------ 2 files changed, 26 insertions(+), 13 deletions(-)
Fixed in 2.21.0.