[Bug 296241] pkgbase: "make update-packages" causes too much disk churn

[email protected] Thu, 23 Jul 2026 14:02:22 +0000
Newsgroups gmane.os.freebsd.bugs
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296241

--- Comment #6 from Alan Somers <[email protected]> ---
Crest: yes, hardlinks would be an improvement!  I plan to try such a change
after merging this one.  However, it wouldn't help me personally, because I put
OBJDIR and REPODIR on separate ZFS file systems, so ln would fail with EXDEV.
Since OBJDIR's churn is so much greater than REPODIR's (especially after this
patch), I think it's worthwhile to separate them, even at the expense of
hardlinks.  ZFS block cloning will help (though as you mentioned, zfs send/recv
reduplicates the cloned blocks).

Lexi, the key part you're missing is that current procedure copies new packages
into the REPODIR.  Their contents are distinct from the old packages.  But
their pkg checksum is unchanged, because pkg checksum apparently ignores the
embedded mtime fields.  My new procedure does not overwrite the packages in
REPODIR if the pkg checksum fields are unchanged.  That's what we already did
for -STABLE and -CURRENT branches.  I just extend the behavior for -RELEASE.

-- 
You are receiving this mail because:
You are the assignee for the bug.