pkg add
chokes on apparantly wrong OS version
I’m experimenting further with ports-mgmt/synth
. I let synth
create some packages for me and I then removed all installed packages, save the pkg
package manager.
What a surprise I got when attempting to add my own metaport!
root@some-host:/var/synth/live_packages/All # pkg add mymetaport-2018020700.txz Installing mymetaport-2018020700... pkg: Newer FreeBSD version for package mymetaport: - package: 1200056 - running kernel: 1200054 Failed to install the following 1 package(s): mymetaport-2018020700.txz root@some-host:/var/synth/live_packages/All # uname -KU 1200056 1200056
Where does pkg
get 1200054
from? I’m clearly running 1200056
of both kernel and world, and I ran that version when building the packages. pkg is as fresh as it can get, pkg-1.10.4
.
According to PR 225104, this is the workaround:
root@some-host:/var/synth/live_packages/All # pkg -o OSVERSION=1200056 add mymetaport-2018020700.txz Installing mymetaport-2018020700... [lots of output omitted]
Success!
It so happens, to continue using synth
for upgrading and installing new versions, /usr/local/etc/pkg.conf
in your “LiveSystem” needs some surgery. Simply add this line at the top of /usr/local/etc/pkg.conf
. Remember to remove it once this issue is properly resolved.
OSVERSION = 1200056;
synth
will also benefit from a LiveSystem-environment
file during its run-depends
phase, and possibly other phases.
OSVERSION=1200056