portmaster or pkg for upgrading after 10.4 -> 11.2

Hi, just a question about upgrading installed ports/packages. Many times I've noticed when running pkg upgrade, it will want to deinstall some packages needed. Just upgraded from 10.4 to 11.2 and now have to rebuild ports/pkgs.
An example can be having currently installed postgresql93-server/client and pkg upgrade wants to deinstall postresql93 and replace it will postgresql95. When trying that postgresql complains the db is for 93 and not 95.

Asking since we have software installed via pkg install and portmaster foo/foo

If portmaster -af is run, will that update pkg installed ports as well?

Thanks.
 
The solution is simple: do not mix ports and packages, because that will eventually get you into trouble. Ports being the stuff you installed through Portmaster and packages the stuff you installed by using pkg install. The reason this gets you into trouble are the clashing dependencies. Ports basically 'adapt' themselves to your system whereas packages have a pre-determined set of dependencies, but also expect the same behavior from those dependencies as well.

If you don't have any specific building policies in /etc/make.conf and didn't customize anything using make config then you might as well use packages, it'll be a whole lot quicker.

Alas.. running # portmaster -af will indeed rebuild everything. However, if you're going to do that I'd also strongly recommend using -R, so: # portmaster -afR. This will make Portmaster keep track of the stuff it rebuild so if some upgrade went wrong and you had to manually fix it then you can re-run the command and Portmaster will skip the stuff it already did.

See also the portmaster(8) manualpage.

Another option is to convert everything to binary packages. You can do that using pkg upgrade -f, that would tell pkg to re-install everything using the package repository.
 
Back
Top