Miroslav Lachman <000.fbsd_at_quip.cz> wrote on Date: Thu, 09 Oct 2025 11:09:29 UTC :
> The update process works the same as before, but in the log files it > looks like "pkg upgrade" can't distinguish between updating packages and > simply installing new ones. > > If I remember it correctly, pkg logs events in to messages, but I have > it configured in syslog.conf to log into separate pkg.log. In the past > (for many years) it was logging like this: > > # grep mariadb /var/log/pkg.log > Jan 22 21:48:42 host1 pkg[4859]: mariadb106-client upgraded: 10.6.19 -> > 10.6.20 > Jan 22 21:57:54 host1 pkg[4859]: mariadb106-server upgraded: 10.6.19 -> > 10.6.20 > Mar 26 21:40:11 host1 pkg[86634]: mariadb106-client upgraded: 10.6.20 -> > 10.6.21 > Mar 26 21:41:02 host1 pkg[86634]: mariadb106-server upgraded: 10.6.20 -> > 10.6.21 > > But there are almost no "upgraded" messages for the last 6 months. I say > "almost" because there are few of the for some packages. > > Upgrade of MariaDB looks like this now: > > Oct 8 21:14:29 host1 pkg[9522]: mariadb1011-server-10.11.13 deinstalled > Oct 8 21:14:45 host1 pkg[9522]: mariadb1011-client-10.11.13 deinstalled > Oct 8 21:18:37 host1 pkg[9522]: mariadb1011-client-10.11.13_1 installed > Oct 8 21:19:01 host1 pkg[9522]: mariadb1011-server-10.11.13_1 installed Note the time frames between deinstall and install: 00:04:31 for mariadb1011-server 00:03:52 for mariadb1011-client Also note the order of the operations: mariadb1011-client has both activities happen while mariadb1011-server is not installed. You appear to have omitted any reference other activity during those minutes. > 16 "upgraded" messages out of 213 messages in total: > > Oct 8 21:14:05 host1 pkg[9492]: pkg upgraded: 2.2.0 -> 2.2.2 > Oct 8 21:14:52 host1 pkg[9522]: apr upgraded: 1.7.5.1.6.3_4 -> > 1.7.5.1.6.3_5 > Oct 8 21:14:54 host1 pkg[9522]: easy-rsa upgraded: 3.2.2,1 -> 3.2.3,1 > Oct 8 21:14:54 host1 pkg[9522]: gdbm upgraded: 1.24 -> 1.25 > Oct 8 21:15:03 host1 pkg[9522]: git upgraded: 2.49.0 -> 2.51.0 > Oct 8 21:15:03 host1 pkg[9522]: libdeflate upgraded: 1.22 -> 1.24 > Oct 8 21:15:03 host1 pkg[9522]: libffi upgraded: 3.4.6 -> 3.5.1 > Oct 8 21:15:04 host1 pkg[9522]: libgpg-error upgraded: 1.51 -> 1.55 > Oct 8 21:15:04 host1 pkg[9522]: libnghttp2 upgraded: 1.65.0 -> 1.66.0 > Oct 8 21:15:04 host1 pkg[9522]: libogg upgraded: 1.3.5,4 -> 1.3.6,4 > Oct 8 21:15:04 host1 pkg[9522]: mpdecimal upgraded: 4.0.0 -> 4.0.1 > Oct 8 21:15:06 host1 pkg[9522]: nettle upgraded: 3.10.1 -> 3.10.2 > Oct 8 21:15:06 host1 pkg[9522]: openjph upgraded: 0.21.2 -> 0.21.3 > Oct 8 21:15:17 host1 pkg[9522]: screen upgraded: 5.0.1_3 -> 5.0.1_4 > Oct 8 21:15:18 host1 pkg[9522]: sqlite3 upgraded: 3.46.1_1,1 -> 3.50.2_1,1 > Oct 8 21:15:19 host1 pkg[9522]: sudo upgraded: 1.9.17p1 -> 1.9.17p2 As I understand, these message are a shorter form for when the deinstall and install for a specific package happen back-to-back with no other activity between them. A simple illustration of the distinction for back-to-back vs. not happening, with reinstall activity instead of upgrade activity is: Oct 4 16:26:32 7950X3D-ZFS pkg-static[6863]: python-3.11_3,2 deinstalled Oct 4 16:26:32 7950X3D-ZFS pkg-static[6863]: python3 reinstalled: 3_4 -> 3_4 Oct 4 16:26:32 7950X3D-ZFS pkg-static[6863]: python-3.11_3,2 installed > And it's not just about MariaDB, it's a simple example. Another huge > example can be PHP - all extensions were previously logged as "upgraded" > and now they all are "deinstalled" and "installed". > > What was changed The order of the operations, possibly due to tracking dependency ordering better or some such. Tying to be able to also handle system upgrades as well to make pkgbase work appropriately likely changed the detailed criteria to be met for deinstallation and installation ordering. In general there are contexts for which: ) something should be deinstalled before deinstallation of what it depends on (transitive closure involved) ) something should be installed after installing what it depends on (transitive closure involved) This is true for both upgrades and for re-installations. > and is there some way to log the pkg upgrade events > like it was before? My guess is that more likely would be having messages that instead say something indicating more, like suggested by: deinstalled for upgrade installed the upgrade deinstallation for re-installation installed the re-installation deinstalled for deletion installed the additional software But such is just a guess and I've no clue if such would be reasonable or be justified for the effort by the amount of use of the extra text. > . . . === Mark Millard marklmi at yahoo.com
