Page MenuHomeFreeBSD

Mk/Uses/python.mk: Flag unknown USE_PYTHON features
AbandonedPublic

Authored by tobik on Mar 13 2019, 10:04 AM.

Details

Summary
Test Plan

Ran make -V DEV_ERROR over the tree. The following ports currently have problems:

# Port				unknown features
databases/py-asyncpg		setuptools
graphics/py-cairocffi		cffi
graphics/sk1			noflavor
science/dvc			noflavor

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23062
Build 22130: arc lint + arc unit

Event Timeline

tobik created this revision.Mar 13 2019, 10:04 AM
mat added a comment.Mar 13 2019, 1:00 PM

All the USES that validate their arguments set IGNORE so that the mistake is found out early. I think this should also be setting IGNORE. Also, could you check that the arguments to USES=python:xxx are also validated?

tobik updated this revision to Diff 55014.Mar 13 2019, 1:14 PM
  • Use IGNORE instead
tobik updated this revision to Diff 55015.Mar 13 2019, 1:44 PM
  • Check USES=python arguments too

New failures:

# Port				bogus args
games/ski			3.2+:run
net-mgmt/librenms-agent		2.7:run
sysutils/py-python-consul	2.7-3.6+
sysutils/xen-guest-tools	configure
tobik updated this revision to Diff 55017.Mar 13 2019, 2:15 PM
  • Simplify and use :N instead of :C
mat added a comment.Mar 13 2019, 2:40 PM
# Port				bogus args
games/ski			3.2+:run
net-mgmt/librenms-agent		2.7:run
sysutils/py-python-consul	2.7-3.6+
sysutils/xen-guest-tools	configure

Mmmm, nice, I "fixed" all four.

I don't see anything wrong with the code, I'll let the other portmgr ponder this for a bit.

sunpoet added inline comments.
Mk/Uses/python.mk
254–258

I would suggest merging _PYTHON_FEATURE_<FEATURENAME> setting (line 263-266) as follows:

.for var in ${USE_PYTHON}
.  if !empty(_VALID_PYTHON_FEATURES:M${var})
_PYTHON_FEATURE_${var:C/=.*$//:tu}=        ${var:C/.*=//:S/,/ /g}
.  else
_INVALID_PYTHON_FEATURES+=        ${var}
.  endif
.endfor
tobik added inline comments.Mar 13 2019, 4:08 PM
Mk/Uses/python.mk
254–258

Why? What is wrong with looping twice?

sunpoet added inline comments.Mar 16 2019, 11:48 AM
Mk/Uses/python.mk
254–258

I'm not saying it's wrong. It's just a suggestion.

tobik abandoned this revision.Apr 15 2019, 4:00 PM
mat added a comment.Apr 18 2019, 12:54 PM

Please, do commit this.

tobik added a comment.Apr 18 2019, 1:20 PM

Thanks. Committed in rP499257. I probably should have reclaimed this before committing for Phabricator to update this post-commit.