Page MenuHomeFreeBSD

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

Authored by asomers on Sat, Jul 11, 3:00 AM.

Details

Reviewers
ivy
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