Page MenuHomeFreeBSD

packages: Don't create empty packages
ClosedPublic

Authored by ivy on Sat, Feb 21, 4:34 AM.
Tags
None
Referenced Files
F145804472: D55412.diff
Tue, Feb 24, 5:07 PM
F145804253: D55412.diff
Tue, Feb 24, 5:03 PM
F145790595: D55412.id172359.diff
Tue, Feb 24, 1:09 PM
F145765735: D55412.id172395.diff
Tue, Feb 24, 4:47 AM
Unknown Object (File)
Mon, Feb 23, 9:54 PM
Unknown Object (File)
Mon, Feb 23, 9:54 PM
Unknown Object (File)
Mon, Feb 23, 9:54 PM
Unknown Object (File)
Mon, Feb 23, 8:07 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 70845
Build 67728: arc lint + arc unit