Solved Unable to update any installed ports on my 10.1 server without using FORCE_PKG_REGISTER=yes

Long time FreeBSD user, but this has me stumped...

This server had originally been upgraded from 9.x to 10.0, then 10.1. It's been using pkgng since before the 10.1 without many/any hiccups.

However, for the last 6-8 weeks I don't seem to be able to upgrade any port using either portmaster or portupgrade without using FORCE_PKG_REGISTER=yes - upgrading an existing port will reliably fail, usually because one of the library dependencies (and it's always a library) is marked as not being present even though it is installed. A typical error would be:

Code:
===>  Applying FreeBSD patches for python27-2.7.9_1
===>  python27-2.7.9_1 depends on executable: pkgconf - found
===>  python27-2.7.9_1 depends on executable: msgfmt - found
===>  python27-2.7.9_1 depends on shared library: libffi.so - not found
===>  Verifying for libffi.so in /usr/ports/devel/libffi
===>  Installing for libffi-3.2.1
===>  libffi-3.2.1 depends on executable: indexinfo - found
===>  Checking if libffi already installed
===>  libffi-3.2.1 is already installed
  You may wish to ``make deinstall'' and install this port again
  by ``make reinstall'' to upgrade it properly.
  If you really wish to overwrite the old port of libffi
  without deleting it first, set the variable "FORCE_PKG_REGISTER"
  in your environment or the "make install" command line.
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/libffi
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/libffi
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/python27
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/python27

The only wrinkle here being that prior to kicking off the upgrade for python27, I had just (manually) upgraded libffi to the latest version. ldd shows no missing dependencies, libffi.so is where I'd expect it to, so I'm a little stumped...

As mentioned, I do have a workaround by basically env'in FORCE_PKG_REGISTER if I hit one of the problematic ports, but to me this indicates there is something not quite right with my system.

I did look at other threads on this subject before posting and in contrast to the majority of them, my server is jail-free.

Just a quick aside - with FORCE_PKG_REGISTER, the python27 build seems to rebuild a whole lot of libraries that have already been installed. For example, not only does it rebuild libffi, it also rebuilds the gettext ports that I had upgraded as per the UPGRADING/20141130 instructions.
 
Often this is due to not following all the required procedures in /usr/ports/UPDATING. Just picking and choosing misses some necessary global upgrades.
 
Thanks, that was the clue I needed.

Despite using FreeBSD since the mid-nineties and running countless buildworlds, I wasn't aware of make delete-old as described in the /usr/ports/UPDATING/20150213 entry. Running make delete-old in /usr/src got rid of an amazing amount of cruft and as a side effect fixed the issue described above.
 
Hmm, interesting. There have been other similar reports of ports requiring FORCE_PKG_REGISTER for no apparent reason. You may have just discovered the very reason.
 
Despite using FreeBSD since the mid-nineties and running countless buildworlds, I wasn't aware of make delete-old as described in the /usr/ports/UPDATING/20150213 entry.
Don't forget make delete-old-libs too ;)
 
Back
Top