Page MenuHomeFreeBSD

Add BROKEN_${OPSYS} functionality to bsd.port.mk
ClosedPublic

Authored by marino on Apr 2 2015, 9:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 11 2024, 7:35 AM
Unknown Object (File)
Mar 9 2024, 8:32 PM
Unknown Object (File)
Feb 3 2024, 6:23 AM
Unknown Object (File)
Dec 19 2023, 11:14 PM
Unknown Object (File)
Oct 31 2023, 4:08 PM
Unknown Object (File)
Oct 24 2023, 9:33 AM
Unknown Object (File)
Oct 12 2023, 1:43 PM
Unknown Object (File)
Oct 12 2023, 12:52 AM
Subscribers

Details

Summary

See title.
While here, tweak description of BROKEN (add missing hyphen, wrap to 75)
Two common cases envisioned:
BROKEN_FreeBSD= (for when port continues to build fine on DragonFly)
BROKEN_DragonFly= (A visible way to show port doesn't build on DragonFly,
especially for ports that fail a long time into the build (e.g.
mysql-workbench*). It saves having to create (an invisible)
Makefile.DragonFly in DPorts.

Note the first case has happened several times.
Note2: Reviewers could not be set to "portmgr"

Diff Detail

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

Event Timeline

marino retitled this revision from to Add BROKEN_${OPSYS} functionality to bsd.port.mk.
marino updated this object.
marino edited the test plan for this revision. (Show Details)
marino added a reviewer: bapt.

I assume about "could not be set to portmgr" you mean when you ran arc diff --create ? portmgr is a group, and you use portmgr to show it.
But it doesn't matter, portmgr will be added as a reviewer for everything that touches Mk, I think.

I've been wanting a BROKEN_RELEASE or BROKEN_OSVERSION. I haven't thought enough about it yet, but I think it could be combined with this BROKEN_OPSYS idea.

i wonder if we can do something like:

BROKEN_IF=       ${OSVERSION} < 900005 || ${OSVERSION} > 1000051
BROKEN_IF_MSG=   Broken with ${OSVERSION} foobar not supported.

The challenge with both OSREL and OSVERSION is that it's specific to FreeBSD.
It would have to be something like:

BROKEN_FreeBSD_R8
BROKEN_FreeBSD_G1000100 (greater than)

for example

If you guys want, I can expand this to handle:

BROKEN_${OPSYS}
BROKEN_${OPSYS}_R${OSREL:R}
BROKEN_${OPSYS}_G[some number] (greater than or equal osversion)
BROKEN_${OPSYS}_L[some number] (less than osversion

you can combine the last two for a range.

Do you want something like that?

I do prefer the

I do like:

BROKEN_${OPSYS}_IF
BROKEN_${OPSYS}_MSG

there are some complexe case for the tests of matching version that cannot be expressed with only a GT/LT so imho it is better to have a generic IF

Q1)
does "BROKEN_FreeBSD_IF= ${OSVERSION} < 900005 || ${OSVERSION} > 1000051"
evaluate to a boolean?

Given the last comment, I'd recommend:

BROKEN_${OPSYS}
BROKEN_${OPSYS}_R${OSREL:R}
BROKEN_${OPSYS}_IF (with BROKEN_${OPSYS}_MSG)

the R version will be useful in its own right.

In D2207#12, @marino wrote:

Q1)
does "BROKEN_FreeBSD_IF= ${OSVERSION} < 900005 || ${OSVERSION} > 1000051"
evaluate to a boolean?

No it does not (I haven't tested but have the feeling it won't) I do not even know if that would be possible at all :) but I do like the idea

Given the last comment, I'd recommend:

BROKEN_${OPSYS}
BROKEN_${OPSYS}_R${OSREL:R}
BROKEN_${OPSYS}_IF (with BROKEN_${OPSYS}_MSG)

the R version will be useful in its own right.

Sounds good

it doesn't work.

This would work though:

.if ${OSVERSION} < 900005 || ${OSVERSION} > 1000051
BROKEN_FreeBSD= my great broken message
.endif

it's simple, flexible, functional and doesn't require more code

marino edited edge metadata.

This version added BROKEN_${OPSYS}_${OSREL:R}

(Note that I decided against the "R", e.g. BROKEN_FreeBSD_8, not BROKEN_FreeBSD_R8)
Anyway, it's valid to do something like:

.if ${OSVERSION} > 800300 && ${OSVERSION} <= 800400
BROKEN_FreeBSD=	Base unsuitable for short window (${OSREL})
.endif

because the OSVERSION between FreeBSD and DragonFly will not overlap.
I think it would still be worth creating "greater than" and "less than"
OSVERSION checks though -- cleaner and more intuitive, and we can always
fall back to the example above for maximum flexibility.

I would really love to see this approved. It can be used all over ports to simplify makefiles, e.g. when something is broken on FreeBSD 8 only...

Nobody has provided a thumbs down so can it be approved?

mat added a reviewer: mat.

Looks good to me.

This revision is now accepted and ready to land.Jun 2 2015, 9:26 AM
This revision was automatically updated to reflect the committed changes.