Page MenuHomeFreeBSD

Reduce disk churn caused by "make update-packages"
Needs ReviewPublic

Authored by asomers on Jul 11 2026, 3:00 AM.
Tags
None
Referenced Files
F171467182: D58167.id.diff
Fri, Sep 11, 6:53 AM
Unknown Object (File)
Sat, Sep 5, 9:35 AM
Unknown Object (File)
Sat, Sep 5, 4:17 AM
Unknown Object (File)
Fri, Sep 4, 4:54 PM
Unknown Object (File)
Fri, Sep 4, 8:18 AM
Unknown Object (File)
Thu, Sep 3, 5:43 AM
Unknown Object (File)
Wed, Sep 2, 6:31 PM
Unknown Object (File)
Wed, Sep 2, 7:15 AM

Details

Reviewers
ivy
Group Reviewers
pkgbase
Summary

When making packages, build the new packages in a temporary location
instead of ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}. Once built, during
real-update-packages, compare the new packages' checksums to the old
ones. If they match, delete the new packages and reuse the old ones.
That reduces the amount of disk churn. "make update-packages" now
modifies only the packages that have actually changed.

This is very similar to the way that "make update-packages" already
behaved on CURRENT and STABLE branches, where PKG_OUTPUT_DIR differed
from PKG_VERSION_FROM_DIR. Now it will do it for RELEASE branches too.

PR: 296241
MFC after: 2 weeks
MFC to: stable/15 only
Sponsored by: ConnectWise

Test Plan

Ran "make packages" and "make update-packages" with BRANCH=CURRENT and BRANCH=RELEASE and verified that packages aren't replaced unnecessarily.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 74715
Build 71598: arc lint + arc unit