Page MenuHomeFreeBSD

kern.post.mk: fix PORTSDIR handling
ClosedPublic

Authored by yuri_aetern.org on Dec 24 2022, 12:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 2:58 PM
Unknown Object (File)
Fri, Oct 25, 1:59 AM
Unknown Object (File)
Sun, Oct 20, 7:53 AM
Unknown Object (File)
Sep 30 2024, 2:05 AM
Unknown Object (File)
Sep 28 2024, 12:52 AM
Unknown Object (File)
Sep 27 2024, 12:23 PM
Unknown Object (File)
Sep 27 2024, 11:27 AM
Unknown Object (File)
Sep 27 2024, 12:55 AM
Subscribers

Details

Summary

Using subshell's PORTSDIR variable (via $${PORTSDIR}}) seems to be
only working if PORTSDIR is specified directly on the make command
line.

Use ${PORTDIR} here instead so that setting the variable in
/etc/{make,src,src-env}.conf would work (also works for variable
being set on command line or in the environment).

Test Plan

Set PORTS_MODULES in /etc/make.conf and PORTSDIR in one of /etc/{make,src,src-env.conf}.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I think this is right...
Also consider this approval by a source committer if you want to commit it :)

This revision is now accepted and ready to land.Dec 27 2022, 1:44 AM
This revision was automatically updated to reflect the committed changes.

Just got a notice on my original bug report for this. Thanks for taking this on @yuri_aetern.org.

Minor question, what does the U stand for in ${PORTSDIR:U/usr/ports, I'm familiar with the other parts of shell variable substitution / replacement, but I haven't seen the U before haha.

Just got a notice on my original bug report for this. Thanks for taking this on @yuri_aetern.org.

Minor question, what does the U stand for in ${PORTSDIR:U/usr/ports, I'm familiar with the other parts of shell variable substitution / replacement, but I haven't seen the U before haha.

It's a make(1) construct now, meaning the same as '-' in shell var subst.

Just got a notice on my original bug report for this. Thanks for taking this on @yuri_aetern.org.

Minor question, what does the U stand for in ${PORTSDIR:U/usr/ports, I'm familiar with the other parts of shell variable substitution / replacement, but I haven't seen the U before haha.

It's a make(1) construct now, meaning the same as '-' in shell var subst.

Thanks for that Yuri. I'll read up on that soon. Other than that, it seems good from what I see in the PR. I haven't tested yet but I don't have any concerns.