Bug 227697 - ports-mgmt/pkg: pkg update: Unable to update repository FreeBSD
Summary: ports-mgmt/pkg: pkg update: Unable to update repository FreeBSD
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-22 13:29 UTC by Wolfram Schneider
Modified: 2018-05-12 00:05 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schneider freebsd_committer freebsd_triage 2018-04-22 13:29:46 UTC
I'm running FreeBSD-current on a small VM with 1GB RAM. I can build the world, but not the kernel anymore due out of memory (and slow swap).

I tried to upgrade the installed packages on the machine, and got a error message that the running kernel is outdated:

# pkg update
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    6 MiB 901.3kB/s    00:07    
Processing entries:   0%
pkg: Newer FreeBSD version for package tdb:
- package: 1200062
- running kernel: 1200055
pkg: repository FreeBSD contains packages for wrong OS version: FreeBSD:12:amd64
Processing entries: 100%
Unable to update repository FreeBSD
Error updating repositories!
# echo $?
70


If I run the command again, I get no error at all:

# pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
# echo $?
0


I expect that in case my kernel is outdated I always get an error from the pkg tool until I update my kernel.
Comment 1 Brad Davis freebsd_committer freebsd_triage 2018-05-12 00:05:44 UTC
Upgrade to a newer version of pkg and it will prompt to you if you want to continue or not.

You can just: pkg delete -f pkg and rebootstrap it.