Page MenuHomeFreeBSD

Fix erroneous messages about needing USES=xorg
ClosedPublic

Authored by zeising on Oct 31 2019, 8:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 10 2024, 6:37 AM
Unknown Object (File)
May 3 2024, 11:04 PM
Unknown Object (File)
Apr 14 2024, 6:48 AM
Unknown Object (File)
Apr 11 2024, 9:22 AM
Unknown Object (File)
Apr 9 2024, 9:03 AM
Unknown Object (File)
Mar 28 2024, 1:18 PM
Unknown Object (File)
Feb 12 2024, 3:40 PM
Unknown Object (File)
Jan 31 2024, 6:15 AM
Subscribers

Details

Summary

Silence erroneous warning about not adding USES=xorg to certain ports that get USE_XORG set from either USES=xorg-cat or USES=gl (and possibly USES=motif). There is a DEV_WARNING late in bsd.port.mk that is triggered in certain cases, because xorg-cat.mk, gl.mk and motif.mk defines USE_XORG and then include xorg.mk directly, instead of setting USES=xorg (which is not possible from within the USES infrastructure).
Fix this by instead using an internal variable _USE_XORG inside the infrastructure.

Test Plan

exp-run

Diff Detail

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

Event Timeline

tobik accepted this revision.EditedNov 4 2019, 6:23 AM
tobik added a subscriber: tobik.

LGTM

For posterity's sake here is a link back to the relevant PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238988#c6

Also the exp-run PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241627

This revision is now accepted and ready to land.Nov 4 2019, 6:23 AM

Thanks for adding the links, I forgot about it when creating the diff.
It is still pending an exp-run (just to be sure).

It would be much simpler to just add xorg to USES instead of sharing private variables everywhere.

Or the DEV_WARNING should only be added to if xorg-cat, gl, motif... are not part of USES either.

In D22210#485882, @mat wrote:

It would be much simpler to just add xorg to USES instead of sharing private variables everywhere.

Yes, however, that requires walking through the entire ports tree, which is a huge task.

In D22210#485883, @mat wrote:

Or the DEV_WARNING should only be added to if xorg-cat, gl, motif... are not part of USES either.

But this is wrong. If a port has USES=gl (or motif, or xorg-cat) but only USE_XORG, it still needs to add USES=xorg as well.

Changing all ports to USES=xorg and removing these (same as is done for XORG_CAT), is of course the best solution. However, that will take quite some time, and I think it's a good idea to silence the broken warning while working on the proper solution.
Is it possible to get blanket approval for adding USES=xorg, gl as needed throughout the ports tree?

In D22210#485882, @mat wrote:

It would be much simpler to just add xorg to USES instead of sharing private variables everywhere.

Yes, however, that requires walking through the entire ports tree, which is a huge task.

Well, no, just add USES+=xorg in the .mk files.

Is it possible to get blanket approval for adding USES=xorg, gl as needed throughout the ports tree?

https://www.freebsd.org/doc/en/articles/committers-guide/ports.html#ports-qa-misc-blanket-approval

In D22210#486191, @mat wrote:
In D22210#485882, @mat wrote:

It would be much simpler to just add xorg to USES instead of sharing private variables everywhere.

Yes, however, that requires walking through the entire ports tree, which is a huge task.

Well, no, just add USES+=xorg in the .mk files.

After discussing with mat a bit on IRC, he's clarified what he meant.

This revision was automatically updated to reflect the committed changes.