| Summary: | ports-mgmt/portlint: Suggests adding PY_FLAVOR when PY_FLAVOR exists | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | risner <risner> | ||||
| Component: | Individual Port(s) | Assignee: | Joe Marcus Clarke <marcus> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Some People | CC: | dereks, john, risner | ||||
| Priority: | --- | Keywords: | needs-qa | ||||
| Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(marcus) |
||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
The original comment was missing the $ at the start.
Works in 2.19.8, broken in 2.19.9 Also seems to effect all py- ports, but doesn't have issues with php ports. portlint.pl
@@ -1161,7 +1162,9 @@ sub check_depends_syntax {
if ($k eq '') {
next;
}
- my @l = split(':', $k);
+ my $tmp_depends = $k;
+ $tmp_depends =~ s/\$\{[^}]+}//g;
+ my @l = split(':', $tmp_depends);
This patch to portlint.pl is responsible for the break. I tested by applying this 3 line change to 2.19.8.
root@chiapos-dev:/usr/ports/ftp/py-aioftp # portlint -A
WARN: Makefile: you may want directory for dependency pytest>0 to be devel/py-pytest@${PY_FLAVOR}
Created attachment 230806 [details]
Split on @ first
s/\$\{[^}]+}//g The g removes all ${...} in each *_DEPENDS.
${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} -> pytest>0:devel/py-pytest@
So later when split on @
1186 my ($di, $fl) = split(/\@/, $l[1]);
$fl is ""
So
if ($m{'fla'} ne '${PY_FLAVOR}')
Is true.
removing the g would fix it for python ports but maybe (re)breaks something else... see 259244
Possible fix with the attached patch for 2.19.9.
Split on @ first then remove the ${...}s
Fixed in my local git repo pending next release. Fixed in 2.19.10. Thanks! |
PORTNAME= clvm PORTVERSION= 0.9.7 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= risner@stdio.com COMMENT= Contract Language Chialisp Virtual Machine LICENSE= MIT TEST_DEPENDS= {PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} USES= python:3.7-3.9 .include <bsd.port.mk> # portlint -A WARN: Makefile: you may want directory for dependency {PYTHON_PKGNAMEPREFIX}pytest>0 to be devel/py-pytest@${PY_FLAVOR} I've tried every way I could to get it to not complain about this Ig nore the FATAL issue, I trimmed down the Makefile to the smallest size I could.