Page MenuHomeFreeBSD

bsd.port.mk: make sure REINPLACE_ARGS is factored into REINPLACE_CMD
AbandonedPublic

Authored by kevans on Sep 25 2020, 5:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 27 2024, 6:19 AM
Unknown Object (File)
Dec 27 2023, 11:33 PM
Unknown Object (File)
Dec 23 2023, 5:38 AM
Unknown Object (File)
Nov 20 2023, 6:15 PM
Unknown Object (File)
Nov 18 2023, 6:24 PM
Unknown Object (File)
Nov 18 2023, 4:55 PM
Unknown Object (File)
Nov 18 2023, 4:19 PM
Unknown Object (File)
Nov 18 2023, 9:00 AM
Subscribers

Details

Reviewers
swills
Group Reviewers
portmgr
Summary

When DEVELOPER is set, we must make sure we inject REINPLACE_ARGS back into it as some ports will use this to provide the actual replacement extension or other important details.

This fixes the build of x11/gnome-pie when DEVELOPER is set.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Does -i... need to be stripped from REINPLACE_ARGS? Like ${REINPLACE_ARGS:N-i*} or something?

Does -i... need to be stripped from REINPLACE_ARGS? Like ${REINPLACE_ARGS:N-i*} or something?

I thought about that and decided it's technically hard to do correctly, since you could have -Ei.orig and that's also valid. The last -i will win the suffix fight, though, so as long as we position it late enough that none other (should) come after it, we're good.

Makes sense. Note that this will necessarily break on ports that rely on no backup files being created. There are a number that patch files that get installed with ${COPYTREE_*}.

Perhaps we should actively encouraging find ... -name *.bak -delete over -i''.

I'd even support a CLEAN_REINPLACE_BACKUPS=yes trigger that gets run before stage over -i''. This is orthogonal to this review though.

I disagree with those changes, x11/gnome-pie is not using REINPLACE_ARGS correctly. That variable can only be used to set the -i argument.

In D26558#592498, @mat wrote:

I disagree with those changes, x11/gnome-pie is not using REINPLACE_ARGS correctly. That variable can only be used to set the -i argument.

Sure. Do we document this somewhere? We should, at or around fixing that particular usage.

In D26558#592498, @mat wrote:

I disagree with those changes, x11/gnome-pie is not using REINPLACE_ARGS correctly. That variable can only be used to set the -i argument.

Sure. Do we document this somewhere? We should, at or around fixing that particular usage.

REINPLACE_ARGS is purposefully not documented in the porter's handbook.
An extra comment in Mk/bsd.port.mk would not hurt though.

In D26558#592593, @mat wrote:
In D26558#592498, @mat wrote:

I disagree with those changes, x11/gnome-pie is not using REINPLACE_ARGS correctly. That variable can only be used to set the -i argument.

Sure. Do we document this somewhere? We should, at or around fixing that particular usage.

REINPLACE_ARGS is purposefully not documented in the porter's handbook.
An extra comment in Mk/bsd.port.mk would not hurt though.

Sure, I can get behind that, maybe:

# REINPLACE_ARGS may only be used to set or override the -i argument.  Any other use is considered
# invalid.

?

In D26558#592593, @mat wrote:
In D26558#592498, @mat wrote:

I disagree with those changes, x11/gnome-pie is not using REINPLACE_ARGS correctly. That variable can only be used to set the -i argument.

Sure. Do we document this somewhere? We should, at or around fixing that particular usage.

REINPLACE_ARGS is purposefully not documented in the porter's handbook.
An extra comment in Mk/bsd.port.mk would not hurt though.

Sure, I can get behind that, maybe:

# REINPLACE_ARGS may only be used to set or override the -i argument.  Any other use is considered
# invalid.

?

Sounds good, feel free.