[Bug 295085] pkgbase: "make update-packages" is not idempotent
Date: Thu, 07 May 2026 17:52:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295085
Bug ID: 295085
Summary: pkgbase: "make update-packages" is not idempotent
Product: Base System
Version: 15.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: asomers@FreeBSD.org
When working from a release branch, it's recommended to run "make
update-packages" after every SA and EN to rebuild the base packages. However,
that does NOT work if BRANCH was not increased. This is not so much a problem
for manual use, but it's a problem for CI setups that want to run "make
update-packages" every time the src tree is updated.
The build will fail in the same way whether or not any files were modified, as
long as BRANCH was not.
Steps to Reproduce
==================
1) Checkout releng/15.0.0-p4
2) Do make buildworld && make buildkernel && make packages # it works
3) Checkout releng/15.0.0-p5
4) Do make buildworld && make buildkernel && make update-packages # it works
5) Optionally, modify any file, for example sys/fs/fuse/fuse_vnops.c .
6) Do make buildworld && make buildkernel && make update-packages # it fails
7) Manually increment BRANCH in sys/conf/newvers.sh
8) Do make buildworld && make buildkernel && make update-packages # it works
Error message
=============
In the failure case, "make update-packages" fails like this:
==> Checking for new packages (comparing 15.0p5 to 15.0p5)
==> Keeping old FreeBSD-acct-15.0p5.pkg
cp:
/usr/obj/usr/home/somers/src/freebsd.org/src/15.0/repo/FreeBSD:15:amd64/15.0p5/FreeBSD-acct-15.0p5.pkg:
No such file or directory
*** [real-update-packages] Error code 1
Suggested remedy
================
It would be very helpful if "make update-packages" could be idempotent. Even
if it means not attempting to rebuild packages if BRANCH does not change.
--
You are receiving this mail because:
You are the assignee for the bug.