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)
Sun, Apr 14, 6:48 AM
Unknown Object (File)
Thu, Apr 11, 9:22 AM
Unknown Object (File)
Tue, Apr 9, 9:03 AM
Unknown Object (File)
Thu, Mar 28, 1:18 PM
Unknown Object (File)
Feb 12 2024, 3:40 PM
Unknown Object (File)
Jan 31 2024, 6:15 AM
Unknown Object (File)
Dec 22 2023, 11:56 PM
Unknown Object (File)
Dec 21 2023, 3:59 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.