pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Terminating pkg while packagesite.txz is partially downloaded makes it impossible to install packages

Open rysto32 opened this issue 8 years ago • 3 comments

I made the mistake of Ctrl-C'ing pkg while it was downloading packagesite.txz, and now I get the following if I try to install a package:

# pkg install -y irssi
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        irssi: 1.0.5,1

Number of packages to be installed: 1

The process will require 2 MiB more space.
488 KiB to be downloaded.
[1/1] Fetching irssi-1.0.5,1.txz: 100%  488 KiB  62.4kB/s    00:08    
pkg: cached package irssi-1.0.5,1: size mismatch, fetching from remote
[1/1] Fetching irssi-1.0.5,1.txz: 100%  488 KiB  83.2kB/s    00:06    
pkg: cached package irssi-1.0.5,1: size mismatch, cannot continue

The issue will persist until a new packagesite.txz is updated upstream, at which point it will re-download a new copy.

rysto32 avatar Dec 21 '17 18:12 rysto32

pkg update -f is likely to help meanwhile.

llelf avatar Jan 17 '18 15:01 llelf

A new wrinkle: I got into this state when I tried a pkg add on a system whose OSVERSION did not match the most recent binary packages. I had to do a "pkg -o OSVERSION=blah update -f" to get out of that state.

I'm not sure what the proper thing to do in this case is, but leaving the repo in a state where it believed it had the latest packagesite.txz when it didn't was clearly not correct.

rysto32 avatar Jan 28 '18 23:01 rysto32

See also:

  • #1956

grahamperrin avatar Dec 07 '23 01:12 grahamperrin