Page MenuHomeFreeBSD

Mk/ Add ability to install subpackages
Needs ReviewPublic

Authored by pizzamig on Feb 8 2024, 9:43 AM.
Referenced Files
Unknown Object (File)
Mon, Apr 8, 10:33 PM
Unknown Object (File)
Sat, Apr 6, 4:34 AM
Unknown Object (File)
Mon, Mar 25, 10:39 PM
Unknown Object (File)
Feb 26 2024, 5:43 AM
Unknown Object (File)
Feb 17 2024, 6:47 AM
Unknown Object (File)
Feb 12 2024, 2:24 PM
Unknown Object (File)
Feb 9 2024, 4:49 PM
Unknown Object (File)
Feb 9 2024, 4:49 PM


Group Reviewers

Subpackages is a feature focused on packages.
However, port builders lack the ability to install portion of a port,
causing a very different behavior.
With this patch we add the ability to install only subpackages
specificed by the TARGET_SUBPACKAGES variable.
This variable is going to contain a comma separated list of subpackages.
If the variable is missing, all subpackages are installed
The variable works for install and reinstall targets.
The deinstall targets keep the previous behavior, removing the whole port.

Diff Detail

R11 FreeBSD ports repository
No Lint Coverage
No Test Coverage
Build Status
Buildable 56042
Build 52931: arc lint + arc unit

Event Timeline

pizzamig created this revision.

This is the "install" part only. Is this review also supposed to get the dependency part for this to work (e.g. a port depending on only a subpackage and the recursive dependency tracking and install needs to set TARGET_SUBPACKAGE), or is the dependency part supposed to come / available in another review?

  • Would it make sense to convert the variable name TARGET_SUBPACAKGE to plural?
  • May it be beneficial / more easy for code which wants to use this, to have TARGET_SUBPACAKGE(S) be a comma separated list instead of a space separated list?
arrowd added inline comments.

I'm not quite sure why _DEPPKGS is needed at all. To ensure the order in which subpackages are installed in case of interdependencies?
But then the previous version of this code doesn't care about it.

  • Use a comma separated list of subpkg
  • Add documentation for TARGET_SUBPACKAGES variable

There is a target per subpackage. Subpackages can have other subpackages as dependencies.
_DEPPKGS is the way to ensure that dependencies are installed as well


Good points.
Update the patch with your suggestions

Running make -C audio/alsa-plugins/ -V _IPKGS TARGET_SUBPACKAGES=, results in emptiness. Not sure if this is a bug, though, but probably should be fixed for POLA sake.

If some subpackages have been disabled via options, should we force to build them anyway if they are listed in TARGET_SUBPACKAGES? What if other ports rely on particular subpackage?