Page MenuHomeFreeBSD

ports-mgmt/portlint: Do not allow PLIST_FILES variable to have %%FOO%%
AbandonedPublic

Authored by dmgk on Nov 8 2017, 7:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 28 2024, 12:20 AM
Unknown Object (File)
Jan 1 2024, 8:53 PM
Unknown Object (File)
Dec 21 2023, 10:15 PM
Unknown Object (File)
Dec 5 2023, 5:37 AM
Unknown Object (File)
Dec 5 2023, 12:38 AM
Unknown Object (File)
Dec 2 2023, 3:33 PM
Unknown Object (File)
Jul 19 2023, 6:45 PM
Unknown Object (File)
Jun 29 2023, 6:07 PM

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 12673
Build 12944: arc lint + arc unit

Event Timeline

ports-mgmt/portlint/src/portlint.pl
1482–1483

Mmmm, this is backwards.

The idea behind %%FOO%% placeholders is to carry variables from the dynamic Makefile to the static pkg-plist file.

As PLIST_FILE is defined in the Makefile, it does not need to have %%FOO%% placeholders, it can simply use ${FOO}. (or whatever %%FOO%% is made of.)

@mat is right here, we should not add %%FOO%% in the PLIST_FILE at all.

ports-mgmt/portlint/src/portlint.pl
1482–1483

The wording can be changed, but would it be a good style to use for ex. ${PORTDOCS}${DOCSDIR}/README in PLIST_FILES? Or, in comms/tio case, ${BASH}share/bash-completion/completions/tio? The idea was that if porter needs to use %%FOO%%, they need to use pkg-plist intead of PLIST_FILES.

ports-mgmt/portlint/src/portlint.pl
1482–1483

In this case, %%PORTDOCS%% is handled by the DOCS option, so it could be written as:

DOCS_PLIST_FILES= ${DOCSDIR}/README

But there is a variable that makes it even shorter:

PORTDOCS=  README

As for %%BASH%%, it is generated by the OPTIONS_SUB knob, and it should be written as:

BASH_PLIST_FILES= share/bash-completion/completions/tio

I already wrote all this in the review that spawned the PR that spawned this code review.

dmgk marked an inline comment as done.

Added separate checks for %%PORTDOCS%%, %%PORTEXAMPLES%% and suggestion to use VAR_PLIST_FILES instead of %%VAR%%.

ports-mgmt/portlint/src/portlint.pl
1482–1483

Added separate checks for %%PORTDOCS%%, %%PORTEXAMPLES%% and suggestion to use VAR_PLIST_FILES instead of %%VAR%%.

Update wording to recommend using ${VAR} directly.