Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg: cached package <portname>: size mismatch, cannot continue #902

Closed
vikashb72 opened this issue Jul 30, 2014 · 5 comments
Closed

pkg: cached package <portname>: size mismatch, cannot continue #902

vikashb72 opened this issue Jul 30, 2014 · 5 comments

Comments

@vikashb72
Copy link

I am unable upgrade or install packages since upgrading to pkg 1.3.3

root@laptop:/root # pkg upgrade
Updating repository catalogue
default repository is up-to-date
All repositories are up-to-date
New version of pkg detected; it needs to be installed first.
The following 1 packages will be affected (of 2 checked):

Installed packages to be UPGRADED:
pkg: 1.3.2 -> 1.3.3

The process will require 20 kB more space
1 MB to be downloaded

Proceed with this action [y/N]: y
Fetching pkg-1.3.3.txz: 100% of 1 MB

Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.3.2 to 1.3.3: 100%
Updating repository catalogue
default repository is up-to-date
All repositories are up-to-date
Checking for upgrades: 100%

Proceed with this action [y/N]: y
Fetching wx28-gtk2-unicode-2.8.12_3.txz: 100% of 2 MB

pkg: cached package wx28-gtk2-unicode-2.8.12_3: size mismatch, fetching
from remote
Fetching wx28-gtk2-unicode-2.8.12_3.txz: 100% of 2 MB
pkg: cached package wx28-gtk2-unicode-2.8.12_3.txz:: size mismatch, cannot continue

root@laptop:/root # pkg install -Rf www/serf
Updating repository catalogue
default repository is up-to-date
All repositories are up-to-date
The following 1 packages will be affected (of 1034 checked):

Installed packages to be REINSTALLED:
serf-1.3.6_1

77 kB to be downloaded

Proceed with this action [y/N]: y
Fetching serf-1.3.6_1.txz: 100% of 77 kB

pkg: cached package serf-1.3.6_1: size mismatch, fetching from remote
Fetching serf-1.3.6_1.txz: 100% of 77 kB

pkg: cached package serf-1.3.6_1: size mismatch, cannot continue

root@laptop:/root # pkg install p5-Crypt-SSLeay-0.72
Updating repository catalogue
default repository is up-to-date
All repositories are up-to-date
The following 4 packages will be affected (of 1034 checked):

New packages to be INSTALLED:
p5-Crypt-SSLeay: 0.72
p5-LWP-Protocol-https: 6.04
p5-Path-Class: 0.33
p5-Net-HTTP: 6.07

The process will require 263 KB more space
123 KB to be downloaded

Proceed with this action [y/N]: y
Fetching p5-Crypt-SSLeay-0.72.txz: 100% of 43 KB

pkg: cached package p5-Crypt-SSLeay-0.72: size mismatch, fetching from
remote
Fetching p5-Crypt-SSLeay-0.72.txz: 100% of 43 KB

pkg: cached package p5-Crypt-SSLeay-0.72: size mismatch, cannot continue

I have removed digests.txz, packagesite.txz, meta.txz from my local
poudriere repo and regenerated the repo.

i have tried
pkg check -s -a
pkg check -Bdsr -a

I am at a loss.
How do i resolve this issue.

@extremelydangerous
Copy link

Em Qua, 2014-07-30 às 08:44 -0700, vikashb72 escreveu:

I am unable upgrade or install packages since upgrading to pkg 1.3.3

root@laptop:/root # pkg upgrade
Updating repository catalogue
default repository is up-to-date
All repositories are up-to-date
New version of pkg detected; it needs to be installed first.
The following 1 packages will be affected (of 2 checked):

Installed packages to be UPGRADED:
pkg: 1.3.2 -> 1.3.3

The process will require 20 kB more space
1 MB to be downloaded

Proceed with this action [y/N]: y
Fetching pkg-1.3.3.txz: 100% of 1 MB

Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.3.2 to 1.3.3: 100%
Updating repository catalogue
default repository is up-to-date
All repositories are up-to-date
Checking for upgrades: 100%

Proceed with this action [y/N]: y
Fetching wx28-gtk2-unicode-2.8.12_3.txz: 100% of 2 MB

pkg: cached package wx28-gtk2-unicode-2.8.12_3: size mismatch,
fetching
from remote
Fetching wx28-gtk2-unicode-2.8.12_3.txz: 100% of 2 MB
pkg: cached package wx28-gtk2-unicode-2.8.12_3.txz:: size mismatch,
cannot continue

root@laptop:/root # pkg install -Rf www/serf
Updating repository catalogue
default repository is up-to-date
All repositories are up-to-date
The following 1 packages will be affected (of 1034 checked):

Installed packages to be REINSTALLED:
serf-1.3.6_1

77 kB to be downloaded

Proceed with this action [y/N]: y
Fetching serf-1.3.6_1.txz: 100% of 77 kB

pkg: cached package serf-1.3.6_1: size mismatch, fetching from remote
Fetching serf-1.3.6_1.txz: 100% of 77 kB

pkg: cached package serf-1.3.6_1: size mismatch, cannot continue

root@laptop:/root # pkg install p5-Crypt-SSLeay-0.72
Updating repository catalogue
default repository is up-to-date
All repositories are up-to-date
The following 4 packages will be affected (of 1034 checked):

New packages to be INSTALLED:
p5-Crypt-SSLeay: 0.72
p5-LWP-Protocol-https: 6.04
p5-Path-Class: 0.33
p5-Net-HTTP: 6.07

The process will require 263 KB more space
123 KB to be downloaded

Proceed with this action [y/N]: y
Fetching p5-Crypt-SSLeay-0.72.txz: 100% of 43 KB

pkg: cached package p5-Crypt-SSLeay-0.72: size mismatch, fetching from
remote
Fetching p5-Crypt-SSLeay-0.72.txz: 100% of 43 KB

pkg: cached package p5-Crypt-SSLeay-0.72: size mismatch, cannot
continue

I have removed digests.txz, packagesite.txz, meta.txz from my local
poudriere repo and regenerated the repo.

i have tried
pkg check -s -a
pkg check -Bdsr -a

I am at a loss.
How do i resolve this issue.


Reply to this email directly or view it on GitHub.

It is a bug...

for me it worked when I remove the repo* from /var/db/pkg

rm -f /var/db/pkg/repo*

re-issue the command, this time pkg will get the right database

@vstakhov
Copy link
Member

As for me, it is a bug of nginx, not of pkg. For more information see http://nginx.org/en/doc/http/ngx_http_core_module.html#if_modified_since
The default value exact seems not to be the sane default, but pkg should work fine with setting this option to before.

@vikashb72
Copy link
Author

Thanks

removing /var/db/pkg/repo* resolved the issue

@Megidd
Copy link

Megidd commented Jun 8, 2017

After running sudo pkg upgrade I was receiving the following message:

pkg: cached package libreoffice-5.3.3_1: size mismatch, fetching from remote

Running the following command fixed it:

sudo pkg update -f and then run sudo pkg upgrade

@brd
Copy link
Member

brd commented Jun 8, 2017

This is a race where the pkg repo is updated and then the new set of pkgs is put up, hence pkg update fixing the issue. We have a long term goal of fixing how this works, but it requires a bit of work for both pkg and the mirroring infrastructure.

chipitsine added a commit to chipitsine/haproxy that referenced this issue Feb 8, 2020
there's a bug freebsd/pkg#902
adding "pkg update -f && pkg upgrade -y" is workaround.

also, add ERR=1 to make, also switch to "snap" images to unify
openssl package naming. also, added freebsd-13 build
haproxy-mirror pushed a commit to haproxy/haproxy that referenced this issue Feb 11, 2020
there's a bug freebsd/pkg#902
adding "pkg update -f && pkg upgrade -y" is workaround.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants