Page MenuHomeFreeBSD

packages: Don't create empty packages
ClosedPublic

Authored by ivy on Sat, Feb 21, 4:34 AM.
Tags
None
Referenced Files
F146832114: D55412.diff
Fri, Mar 6, 12:13 AM
F146737121: D55412.id172395.diff
Thu, Mar 5, 4:06 AM
Unknown Object (File)
Wed, Mar 4, 5:35 PM
Unknown Object (File)
Wed, Mar 4, 4:03 PM
Unknown Object (File)
Mon, Mar 2, 11:06 AM
Unknown Object (File)
Mon, Mar 2, 8:06 AM
Unknown Object (File)
Mon, Mar 2, 5:22 AM
Unknown Object (File)
Sun, Mar 1, 11:11 PM
Subscribers

Details

Summary

If a package plist only contains directories, but no files, do not
create the package.

This fixes an issue where setting "package=foo" in mtree causes the
"foo" package to always be created, even if nothing else installs in
that package, because the mtree entry is always added to the plist.

This most often happens:

  • With architecture-specific directories, because mtree can't install a directory conditionally based on architecture, and
  • With packages that are completely empty when a particular src.conf knob is disabled, because mtree will still create the directories.

Although it's theoretically possible that we might want to create a
package that only contains directories, there are no such packages
today.

MFC after: 2 weeks (stable/15 only)
Sponsored by: https://www.patreon.com/bsdivy

Diff Detail

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