Page MenuHomeFreeBSD

bsd.port.mk: fix setting of FLAVOR in _FLAVOR_RECURSIVE_SH
ClosedPublic

Authored by avg on May 31 2021, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 4:46 PM
Unknown Object (File)
Oct 29 2024, 2:01 PM
Unknown Object (File)
Oct 15 2024, 5:24 AM
Unknown Object (File)
Oct 7 2024, 10:47 AM
Unknown Object (File)
Oct 4 2024, 12:00 PM
Unknown Object (File)
Oct 4 2024, 9:41 AM
Unknown Object (File)
Oct 3 2024, 8:36 PM
Unknown Object (File)
Oct 1 2024, 5:27 PM
Subscribers

Details

Summary

There are several ways of handling recursive targets.
I found at least

  • Mk/Scripts/do-depends.sh
  • Mk/Scripts/depends-list.sh
  • _FLAVOR_RECURSIVE_SH

It looks that the latter has a couple of problems comparing to others.
First, it does not handle '@' in a port name.
Second, it would set FLAVOR to the empty value even if a package is not
"flavored". That can confuse some ports.

A fast demonstration of the second problem:

$ make -C /usr/ports/lang/gcc9 checksum-recursive
...
===>   native-binutils-2.33.1_4,1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by native-binutils-2.33.1_4,1 for building
...

Note how the package name is native-binutils instead of binutils.
A longer demonstration of the problem would be with the package-resursive target.

That issue was reported and analyzed some time ago, unfortunately with
no action: https://www.mail-archive.com/freebsd-ports@freebsd.org/msg84543.html

The proposed change brings _FLAVOR_RECURSIVE_SH closer to the other
recursion methods and it should fix both of the problems.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 39601
Build 36490: arc lint + arc unit

Event Timeline

avg requested review of this revision.May 31 2021, 4:22 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 1 2021, 7:18 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.