pkg 2.0.0 problems

And beware that it could remove a lot of your package, since it will de-install a lot a package before reinstalling them.
This happen to me, it de-install a bunch of package then it crashes. Letting me without 240 packages previously installed.
Unfortunately, maybe I'm bitten by this. Not recorded (my bad!) but some pkga cannot be properly detected and causing mid-air crash, thus, reinstallations after deinstallations do not happen, thus, lost pkgs.

I habitally do dry-run before actual upgrade and check for "removed" to be exist or not. Nothing listed but many are deinstalled.

"Old school" bare-metal upgaring tools (at least ports-mgmt/portupgrade[-deve] and ports-mgmt/pkg_replace) historically backs up currently installed version before deinstallation, and if the installation of updated port somehow fails, delete the remnants of updated one and reinstalls currently installed version from the backup.
In my humble opinion, pkg(8) should do the same, too. At least make options to allow the behavior.
 
Unfortunately, maybe I'm bitten by this. Not recorded (my bad!) but some pkga cannot be properly detected and causing mid-air crash, thus, reinstallations after deinstallations do not happen, thus, lost pkgs.

I habitally do dry-run before actual upgrade and check for "removed" to be exist or not. Nothing listed but many are deinstalled.

"Old school" bare-metal upgaring tools (at least ports-mgmt/portupgrade[-deve] and ports-mgmt/pkg_replace) historically backs up currently installed version before deinstallation, and if the installation of updated port somehow fails, delete the remnants of updated one and reinstalls currently installed version from the backup.
In my humble opinion, pkg(8) should do the same, too. At least make options to allow the behavior.
Hopefully, I noticed it, and scroll back to copy each line that have deinstalling without an installing it on a file. Then I installed back all that was missing with the magic of grep, awk, sort, uniq, rev ,cut and xargs.
 
Hopefully, I noticed it, and scroll back to copy each line that have deinstalling without an installing it on a file. Then I installed back all that was missing with the magic of grep, awk, sort, uniq, rev ,cut and xargs.
I'm using ports-mgmt/poudriere-devel for building pkgs locally (on stable/14 only, not on main), but want to delay too heavy leaves like www/chromium, editors/libreoffice.
So I'm using my script here (local one and uploaded one differs only on blocklisted ports) and have the list of ports I had in hand (except blocklisted ones, but they are surely known).

Comparing the previous list file and broken environment allows me confirming what ports are accidentally deinstalled. So I'm restoring with checking whether they still work or not, starting from anything vital for me.
 
I had to build minetest from ports after upgrading pkg. 😏 I really like pkg but that's a bit annoying when it doesn't have the package. Not a big deal though.
 
Btw, I was on latest instead of quarterly. If quarterly doesn't have this issue I think of reinstalling because on another device I recently installed FreeBSD 14.2 with pkg on quarterly and there were no issues with chromium/widevine.
 
A bit odd: at this moment freshports-pkg shows only two packages at 2.0.0:
  • FreeBSD:13:latest for i386
  • FreeBSD:14:latest for i386
Others are still on 1.x. On 14.2 - latest on amd64 I'm getting:
Code:
# pkg search '^pkg-(1|2)'
pkg-2.0.0                      Package manager
However, mouse-over data on freshports for 14-amd64/latest shows:
Code:
2025-01-22 03:35 – repo build date
2025-01-22 12:00 – processed by FreshPorts
2025-01-25 17:00 – last checked by FreshPorts

P.S. the sequence of 2.0.0 - 2.0.4 does begin to look like RCs before a FreeBSD release version.
 
You should try make install-missing-packages before to compile.
See ports(7).
I do not have missing packages. Problem is librsvg2-rust 2.58.5_3 which I deleted and from cache add version 2.58.5_2. Version 2.58.5_4 works correct (installed correct) and I do not want to build on laptop rust.
 
So, i found this thread by lucky in the middle of a upgrade:
Code:
beastie@BattleStar-Lat5420 --> ~
Ψ doas pkg upgrade                                                                                                                                                             < 13:59 >  < 11,725-01-25 >  < 0 >
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD_Kmods repository catalogue...
FreeBSD_Kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (9 candidates): 100%
Processing candidates (9 candidates): 100%
Checking integrity... done (3 conflicting)
  - librsvg2-2.40.21_4 [FreeBSD] conflicts with librsvg2-rust-2.58.5_3 [installed] on /usr/local/bin/rsvg-convert
  - librsvg2-2.40.21_4 [FreeBSD] conflicts with librsvg2-rust-2.58.5_3 [FreeBSD] on /usr/local/bin/rsvg-convert
  - webkit2-gtk_40-2.46.5_1 [FreeBSD] conflicts with webkit2-gtk3-2.34.6_10 [installed] on /usr/local/include/webkitgtk-4.0/JavaScriptCore/JSBase.h
Cannot solve problem using SAT solver, trying another plan
Checking integrity... done (0 conflicting)
The following 18 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
        librsvg2-rust-2.58.5_3 [FreeBSD] (provided shared library changed)
        pkg-2.0.0 [FreeBSD]
        qt6-webengine-6.8.1 [FreeBSD] (provided shared library changed)

Installed packages to be REMOVED:
        ImageMagick7: 7.1.1.26_6
        emacs: 29.4_2,3
        gegl: 0.4.48_3
        gimp: 2.10.38,2
        gimp-app: 2.10.38_2,1
        gimp-gutenprint: 5.3.4
        lxqt: 2.1.0
        obconf-qt: 0.16.4_1
        openbox: 3.6_12
        openbox-arc-theme: 20170104
        pdf-tools: 1.1.0_8
        qtcreator: 15.0.0
        syncthingtray-qt6: 1.7.1
        tablist: 1.0.13_9
        zbar: 0.23.90_5

Number of packages to be removed: 15
Number of packages to be reinstalled: 3

The operation will free 453 MiB.

Proceed with this action? [y/N]: n
beastie@BattleStar-Lat5420 --> ~
Ψ  pkg -v                                                                                                                                                                       < 14:06 >  < 11,725-01-25 >  < 0 >
2.0.0

What are the recommended steps for now?
i've fixed that in my workstation by running
pkg
Bash:
pkg removewebkit2-gtk3-2.34.6_10
then casually pkg update && pkg upgrade
 
pkg(8) in ports is currently at DISTVERSION= 2.0.2
It looks like pkg 2.0.x is proceeding towards 2.0.3: [Bug 284295] ports-mgmt/pkg: pkg -q not quiet when using -r.

Follow/subscribe to freebsd-pkg mailinglist or watch the commits at ports-mgmt/pkg

On freshports-pkg and as I see it now:
Code:
 % pkg search '^pkg-(1|2)'
pkg-1.21.3                     Package manager
the package of pkg(8) is still at the previous "major" version. I suggest, either
  • upgrade to 2.0.2 from ports and wait for 2.0.3
  • or stick with version 1.21.3 for the time being
Being on the conservative side means using 1.21.3 (You may have to delete your current installed pkg(8) first and use pkg(7) to get pkg(8) 1.21.3 installed.)
As someone who's never needed to downgrade pkg before, can you expand on how to do that for someone who is a poor manager of their system?
 
Back
Top