Page MenuHomeFreeBSD

Add Flavor helpers for DEPRECATED and EXPIRATION_DATE
ClosedPublic

Authored by tcberner on Sun, Oct 28, 7:44 PM.

Details

Summary

If a port has multiple flavors and one needs to be deprecated, one could now write

qt4_DEPRECATED=		Qt4 has been EOL since december 2015
qt4_EXPIRATION_DATE=	2019-03-15

instead of the more wordy

. if ${FLAVOR} == qt4
DEPRECATED=		Qt4 has been EOL since december 2015
EXPIRATION_DATE=	2019-03-15
. endif

@rene, this would likely require changes to your reap-scripts, as ports
could be marked deprecated as their default flavor is, but not their secondary ones.

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

tcberner created this revision.Sun, Oct 28, 7:44 PM
rene added a comment.Sun, Oct 28, 8:22 PM

The wordy version in your example should be

. if ${FLAVOR} == qt4
DEPRECATED=		Qt4 has been EOL since december 2015
EXPIRATION_DATE=	2019-03-15
. endif

So without the trailing "qt4_". It looks a bit over-engineered to me, but perhaps we can save an .include somewhere.

When having Tools/scripts/rmport look for expired ports, it uses this code:

       EXPVAR=EXPIRATION_DATE
        find -H ${PORTSDIR} -mindepth 3 -maxdepth 3 -name "Makefile*" \
                |xargs grep -H  "^[^#]*${EXPVAR}"  \
(....)

So flavored expiration dates will not be found. It does evaluate EXPIRATION_DATE using make(1) when making up the commit message and adding the MOVED lines.

tcberner edited the summary of this revision. (Show Details)Sun, Oct 28, 8:30 PM
In D17740#379092, @rene wrote:

The wordy version in your example should be

. if ${FLAVOR} == qt4
DEPRECATED=		Qt4 has been EOL since december 2015
EXPIRATION_DATE=	2019-03-15
. endif

woops, copy & paste error, corrected.

rene accepted this revision.Sat, Nov 10, 9:58 AM
This revision is now accepted and ready to land.Sat, Nov 10, 9:59 AM
This revision was automatically updated to reflect the committed changes.