Solved pkg updating

I am wondering how to best use the pkg updating tool.
It seems to me you should read UPDATING before running update, but how to handle this with pkg?
I guess what I am wondering is, Shouldn't you look at UPDATING before the update so you can deal with any changes?
With pkg updating it shows UPDATING, but after the pkg is updated, right?
How to you get UPDATING info before the pkg update is installed?
 
I'm running in parallel a test lab for my production mail servers. Where a restore the complete backup into virtual machine then updating the port tree, reading the /usr/ports/UPDATING then perform the update from the ports and write down every step. After the update in the test lab i observe for any error logs and check the general functionality of the running services if everything is running good i perform the actual update on the production servers.

If you are using pkg to perform binary update then you need to know that there's a tree different things:
update Update the available remote repositories as listed in
pkg.conf(5).

updating
Display UPDATING entries of installed packages.

upgrade
Upgrade a package to a newer version.
 
You need to update your local repositories first to fetch the new UPDATING info.

edit:
if you do pkg version without update the local pkg repo against the remote repositories then you will not see any new ports. So you first run pkg update to update your local pkg list then you can check for new pkg versions read the UPDATING info and after that you can run pkg upgrade to upgrade your package to new version.
 
Ahha then pkg updating shows the most up to date UPDATING after running pkg update.

Looking at it like that, it should have been obvious to me. I guess I really never understood what pkg update was doing.
 
Correct.

It's the same with the ports. You need first to update (fetch) new ports tree and after that you can open the new UPDATING file to read the changes. Keep in mind that if you have /usr/ports the pkg utility also check against the ports for the new version.

VERSION_SOURCE: string
Default database for comparing version numbers in
pkg-version(8). Valid values are I for index, P, for ports,
R for remote. Default: If unset, the algorithm described in
pkg-version(8) is used to determine the version source auto-
matically.
 
One more deep dive question. Where is UPDATING kept in a pkg only system?
Is it the database in /var/db/pkg/local.sqlite?
 
The pkg updating command scans the installed ports and show all UPDATING entries that affect one of the installed ports.

check the pkg-updating manual
 
This works for package system also. But how to display package message & UPDATING for uninstalled package in package system?

Edit: I am using 'solved' thread, sorry.
 
Back
Top