Page MenuHomeFreeBSD

Fix erroneous messages about needing USES=xorg
ClosedPublic

Authored by zeising on Thu, Oct 31, 8:48 PM.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

zeising created this revision.Thu, Oct 31, 8:48 PM
tobik accepted this revision.EditedMon, Nov 4, 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.Mon, Nov 4, 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).

mat added a comment.Mon, Nov 4, 11:31 AM

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

mat added a comment.Mon, Nov 4, 11:45 AM

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?

mat added a comment.Tue, Nov 5, 11:21 AM
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.

mat added a comment.Tue, Nov 5, 11:22 AM

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

zeising added a comment.EditedTue, Nov 5, 11:26 AM
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.
Herald added 1 blocking reviewer(s): portmgr. · View Herald TranscriptWed, Nov 6, 7:02 PM