# pkg mismatch issue after upgrade and rollback



## gofer_touch (Jun 21, 2020)

I have the following system installed:


```
FreeBSD box 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug  9 11:55:48 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```

Which had been dormant for some time. I begin the process of upgrading this but had some problems and decided to rollback and do things a bit more slowly. The main issue that I am trying to solve at the moment is related with pkg:


```
root@box:/usr/home/user # pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    916 B   0.9kB/s    00:01   
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz: 100%    6 MiB 435.0kB/s    00:15   
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
Unable to open created repository FreeBSD
Unable to update repository FreeBSD
Error updating repositories!
```

In /var/db/pkg/FreeBSD.meta I have the following details:


```
version = 2;
packing_format = "txz";
manifests = "packagesite.yaml";
filesite = "filesite.yaml";
manifests_archive = "packagesite";
filesite_archive = "filesite";
```

I am not sure what I need to do here in order to get pkg to work again. I did try "pkg-static upgrade", which did not work for me.

`cat /etc/pkg/FreeBSD.conf` contains the following information:


```
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
```

In /var/db/pkg I have the following:


```
FreeBSD.meta
local.sqlite
repo-FreeBSD.sqlite
vuln.xml
```

I ended up doing the following:

`/usr/sbin/pkg bootstrap -f`

Which now seems to allow pkg to work, but then I get this:


```
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01   
Fetching packagesite.txz: 100%    6 MiB   3.3MB/s    00:02   
Processing entries:   0%
Newer FreeBSD version for package vorbisgain:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1103000
- running kernel: 1101001
Ignore the mismatch and continue? [Y/n]: y
Processing entries: 100%
FreeBSD repository update completed. 31592 packages processed.
All repositories are up to date.
```

What might be the best way to resolve this conflict? Any suggestions would be highly appreciated!


----------



## Emrion (Jun 21, 2020)

I believe this has no impact except for the mentioned package which is incompatible with your current kernel. Do you use vorbisgain? If no, there is no trouble.

Resolve this "problem" implies to update your system.


----------



## gofer_touch (Jun 21, 2020)

Thank you! Upgrading (slowly) did the trick.


----------

