Solved How to update packages with portmaster?

Hello.

I am running FreeBSD 10.0-RELEASE-p12 and I don't want to mix ports and packages. So I build from sources use make install or portmaster instead of pkg installing pre-compiled packages.

When ports have updates, portmaster could not find updated packages, why? I don't want to use pkg update && pkg upgrade. Once I use ports to make install packages it returns errors, but portmaster will be fine. What's the real difference between ports and portmaster when install packages from /usr/ports?

Code:
$ sudo portsnap fetch update
Looking up portsnap.FreeBSD.org mirrors... none found.
Fetching snapshot tag from portsnap.FreeBSD.org... done.
Latest snapshot on server matches what we already have.
No updates needed.
Ports tree is already up to date.

Code:
$ sudo pkg version -vIL=
dri-9.1.7_6,2                      <   needs updating (index has 10.3.2,2)
libGL-9.1.7_3                      <   needs updating (index has 10.3.2)
libglapi-9.1.7_2                   <   needs updating (index has 10.3.2)

Code:
$ sudo portmaster -a
===>>> Gathering distinfo list for installed ports
===>>> Starting check of installed ports for available updates
===>>> All ports are up to date
When I use portmaster -af all of the ports will be rebuild, incredible.
 
Last edited:
  1. You don't need to use sudo for pkg version.
  2. portmaster -a[B]f[/B] does what it's supposed to do: the -f flag forces a rebuild of all installed ports.
  3. If you don't (want to) use precompiled packages, I recommend you disable the official FreeBSD package repository:
    sudo mkdir -p /usr/local/etc/pkg/repos
    sudo echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
  4. Either build your own local index ( sudo make -C /usr/ports index) or don't use the -I flag with pkg version. If you don't have your own local index built from the ports tree pkg uses the index from the official FreeBSD package repository unless you have that repository disabled, as described above (in which case -I won't work anyway).
  5. There are two versions of MESA: a new version 10 and an old version 9 that is being kept around until some legacy stuff goes EoL (End of Life). Version 9 is the default and is what you have installed. But the packages in FreeBSD's repository seem to be using version 10 already - apparently they are built with WITH_NEW_MESA. Because (I suspect) you're comparing against FreeBSD's package repository index, pkg version is tricked into thinking the ports you mentioned need updating while portmaster correctly finds they are up to date.
If you want to start using the new MESA version, put this in your /etc/make.conf:
Code:
WITH_NEW_MESA=yes
and use sudo portmaster -a to get everything MESA-related rebuilt. Otherwise, either build your own index or don't use the -I flag with pkg version.

P.S. If you're using portmaster, you don't need to use pkg version to find out which packages need updating. sudo portmaster -a does that too and will ask you for confirmation before it starts actually building stuff.
 
Back
Top