From nobody Thu Jul 9 18:56:12 2026 X-Original-To: pkg@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx41T2FgQz6kgjX for ; Thu, 09 Jul 2026 18:56:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx41T1dLnz3rYl for ; Thu, 09 Jul 2026 18:56:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783623373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8+oQL8fVYSd9kWS1tUFujq5nYDR8k2vYdMDj+jkbMlA=; b=oDFFRQfPO6yfV5ET3xO0XR6NFaGqfmEriyVL/18pFVQ/aPMugzancbH0B1zMc2DzVF9BKC xc5wLG0ipNLFA0GaruAsXSOL89mziWJzOtdlCeOicx828v64HVyeiw/w77ONOuuE5KNjCw 2TQFGusbkcqC6e12tZxgSo1PTSkil7If42D1t79XdB8xQqI0TO1IN1hFDpgOY7OVFEqRHl 9c3xWOZld1j8d8wvzREqiJnU6chP7CCMfxtOpqbtoBSShs+04GIU1zzVpvfr/H7PXYcJlz XSnImNbubX/7z7n4d+EDrmD8lEYXiP/0VVjNXL0bs35sdx0z6UJo/4CdeXLhtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783623373; a=rsa-sha256; cv=none; b=lb1UsYgDtXxw/a1XRvqpGjHTfMucTR4C/L2WhQHBPk813jP/whweQjGbyTRYv5HfcRyH6z 7YWUj2cP87WAMEJ1nIqlrMKx2g9/LDmX5yl7mosHtoudx5qO54tL3k+2hET0IoaGWo/RqA 7tfpFBibFU7zfAKpOA1wSgvS6LBokqNPzUYvUwIziHaeLltqFiCoUWeyv1Jqn8kLm6zsdA 7JbEN0kaTngttz0Zcp490MGd4REgR0PLqbWdq6pjqvJcJChSd4V8N1pck07PZG+ZZ7g0jw verlG1+GeDefZURSOHT+u6r4HGyBsxuwx1p/Ah4meTlv8372sw/3W1+Ht08H0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783623373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8+oQL8fVYSd9kWS1tUFujq5nYDR8k2vYdMDj+jkbMlA=; b=GOy0oyIRg9x6WsfcTlo7WysSDwUY4+oRqUb0ZYPt14oqzKJFGrnoS+xnwl7ATAgnogX6m4 OUFHHfF2xrnAXsYFIqCelUmSsDoyTDwCNv4B5SYqZed7yQJ6UOYWrHTl+rH0sll+7fIi0g 5C82RMTiUdnxtekJfyj0NKQ6MyBk4B0NuwySUxpPoyfFr7NnnTp0fd5Lr9blBNYHym2RPi BcA1OdcBwf87UxlZJvWValFrdU0TWo8xqASL0+tawkWWqV68RwSz3hBoSB4aeiyy25ISgG Ej3t3QXX0CSDTr/jphEkNn0TtFcmOU6YqTh3u/saIewL4Md1S9SoteKup8Xxjw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4gx41S6vbSz5WY for ; Thu, 09 Jul 2026 18:56:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 669IuCY6086003 for ; Thu, 9 Jul 2026 18:56:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 669IuCv7086002 for pkg@FreeBSD.org; Thu, 9 Jul 2026 18:56:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: [Bug 296241] pkgbase: "make update-packages" causes too much disk churn Date: Thu, 09 Jul 2026 18:56:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 16.0-CURRENT X-Bugzilla-Keywords: pkgbase X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: asomers@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D296241 Alan Somers changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open --- Comment #2 from Alan Somers --- Lexi, I don't think you need to worry. Even though the new packages contain different mtimes in the +MANIFEST, the package checksum, as reported by 'pkg query -F ${PKG} "%X"', is unchanged. I guess pkg is smart enough to skip t= he mtime when it computes checksums. Or maybe it skips +MANIFEST entirely. At any rate, that's probably why we don't have to download hundreds of package= s to update 15.1 to 15.1p1. As for the overall problem, I have a better understanding now: 1) First, create-world-packages creates new packages for everything in pkgb= ase and puts them into the final location in REPODIR. 2) Second, real-update-packages runs. If PKG_VERSION =3D=3D PKG_VERSION_FR= OM, which will be the case when running "make update-packages" twice in a row o= n a release branch, then real-update-packages basically does nothing. All of t= he newly packages will have different embedded mtime values than the previous packages, which are by now deleted. BUT, on a CURRENT or STABLE branch, PKG_VERSION will contain an encoded timestamp, and thereby differ from PKG_VERSION_FROM. In that case, real-update-packages will compare the packages' checksums. If they are unchanged, then it will copy the old pack= age into the new output directory. That's possible because the old and new directories are different. To fix this problem, I propose creating a PKG_OUTPUT_TMPDIR. It will locat= ed right next to PKG_OUTPUT_DIR, so they'll share a file system. Makefile tar= gets like create-world-packages will write to PKG_OUTPUT_TMPDIR. Then real-update-packages will populate PKG_OUTPUT_DIR like this: * For stable branches, either copy the old package to the new output dir and delete the new tmp package if it's unchanged, or move the new package from the tmp location to the new output dir if it's changed. * For release branches, either delete the tmp package if the package is unchanged, or move the new one from the tmp location if it's changed. * When bootstrapping, move the entire tmp location to the new location. This should eliminate unnecessary churn in REPODIR, at least for release branches. For stable branches, "zfs dedup" will still be helpful. This proposal won't do anything to help runtimes, because we'll still be writing= out a full set of packages every time. Fixing that would be a more difficult problem. --=20 You are receiving this mail because: You are on the CC list for the bug.=