pkg icon indicating copy to clipboard operation
pkg copied to clipboard

pkg update does not update the local package repository catalogues

Open pierswalter opened this issue 3 years ago • 4 comments

I'm trying to upgrade my ports:

Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (13 candidates): 100%
Processing candidates (13 candidates): 100%
The following 13 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
	perl5: 5.28.2 -> 5.30.0
	pcre: 8.43_1 -> 8.43_2
	glib: 2.56.3_5,1 -> 2.56.3_6,1
	fusefs-libs: 2.9.9 -> 2.9.9_1
	courier-unicode: 2.1_1 -> 2.1_2
	courier-imap: 5.0.7_1,2 -> 5.0.8,2
	courier-authlib-userdb: 0.69.0 -> 0.69.1
	courier-authlib-base: 0.69.0 -> 0.69.1
	apr: 1.6.5.1.6.1_1 -> 1.7.0.1.6.1

Installed packages to be REINSTALLED:
	sysconftool-0.17 (direct dependency changed: perl5)
	exim-4.92.3 (direct dependency changed: perl5)
	db5-5.3.28_7 (options changed)
	apache24-2.4.41 (direct dependency changed: perl5)

Number of packages to be upgraded: 9
Number of packages to be reinstalled: 4

The operation will free 1 MiB.
38 MiB to be downloaded.

Proceed with this action? [y/N]: y
pkg: http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/All/sysconftool-0.17.txz: Not Found

The requirement to use the old, no longer existing version sysconftool 0.17 comes from two Courier packages:

$ pkg info -r sysconftool
sysconftool-0.17:
	courier-imap-5.0.7_1,2
	courier-authlib-base-0.69.0

Once these two packages would be updated (as pkg upgrade intends to do), they would then depend on sysconftool 0.18 (which is available). But pkg upgrade seems to want to reinstall the old dependency first, which fails. So I'm stuck.

I'm not sure if you'd qualify this as a bug, but it sure feels wrong.

pierswalter avatar May 05 '21 13:05 pierswalter

This is on FreeBSD 12.2-RELEASE-p6, by the way.

pierswalter avatar May 05 '21 15:05 pierswalter

I managed to track down the root cause. My local package repository catalogues had not been in sync with the actual repositories. I had run sudo pkg update before, but that just told me:

Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.

Only when I called sudo pkg update -f were my local package repository catalogues properly updated. Afterwards the problem described above no longer occurred.

I've changed the title of this issue from pkg upgrade wants reinstall a package that no longer exists to pkg update does not really update the local package repository catalogues

pierswalter avatar May 05 '21 15:05 pierswalter

I'm still having this problem on FreeBSD 13.1-RELEASE. I have run pkg update -f as root, and yet, still showing out of date.

(root) nog : ~ --> pkg version -l '<' | egrep '(pkg|vim|tmux)'
pkg-1.18.3                         <
tmux-3.2a                          <
vim-9.0.0016                       <
(root) nog : ~ --> pkg --version
1.18.3
(root) nog : ~ --> vim --version | head -2
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jul  3 2022 01:24:17)
Included patches: 1-16
(root) nog : ~ --> tmux -V
tmux 3.2a

ooglek avatar Aug 07 '22 18:08 ooglek

… still showing out of date. …

Sorry, I can't see this …

grahamperrin avatar Oct 08 '22 19:10 grahamperrin