Page MenuHomeFreeBSD

Mk/Uses/qt.mk: Complain about components with an unknown suffix instead of silently accepting them
ClosedPublic

Authored by tobik on Feb 20 2019, 11:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 6:46 PM
Unknown Object (File)
Fri, Apr 19, 1:49 PM
Unknown Object (File)
Jan 17 2024, 5:17 AM
Unknown Object (File)
Dec 20 2023, 4:18 AM
Unknown Object (File)
Nov 27 2023, 5:56 AM
Unknown Object (File)
Nov 23 2023, 5:18 PM
Unknown Object (File)
Nov 23 2023, 3:06 PM
Unknown Object (File)
Sep 12 2023, 11:13 PM

Details

Summary

Normally USES=qt complains about unknown components in USE_QT with
a message like

===>  $PKGNAME cannot be installed: unknown USE_QT component
'foobar'.

However this fails if the component has a suffix starting with _, e.g.,

USE_QT=	buildtools_build,core

or even something as simple as

USE_QT=	buildtools_buld

is silently accepted. Of course it doesn't do anything but it can
lead to some head scratching for porters and in the worst case wrong
or missing dependencies in ports.

The regular expression used to strip suffixes is overeager and
strips everything after a _, even invalid suffixes. To fix this
we can amend it to be very strict. AFAICT we only have to cases
_build and _run to cover here so we can explictly spell them
out.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Mmmm, do you plan on asking for an exp-run with this patch to fix the fallout?

In D19267#412287, @mat wrote:

Mmmm, do you plan on asking for an exp-run with this patch to fix the fallout?

Sure, I can ask for an exp-run if you want.

Running make check-sanity on the affected ports would trigger the error too if ports have any unknown components already. I couldn't find any problems doing that just now though.

tcberner added a subscriber: tcberner.

Looks fine to me. Please ask for an exp-run before landing, to be o the save side.

Looks fine to me. Please ask for an exp-run before landing, to be o the save side.

Thanks. @antoine disagrees about the need for an exp-run though: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235898

In that case, lets go with accepted if make -VIGNORE shows no error :)

Macro makeitso:

In that case, lets go with accepted if make -VIGNORE shows no error :)

Does make -V IGNORE show me anything that make check-sanity didn't already do though?

make -VIGNORE run over all ports was fine.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 20 2019, 9:24 PM
This revision was automatically updated to reflect the committed changes.