I usually locally build all ports but decided to install lang/squeak to check an issue reported on a mailing list. Unfortunately, pkg insists that it needs to be reinstalled, even after being freshly rebuilt: server% sudo pkg install lang/squeak Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. New version of pkg detected; it needs to be installed first. The following 1 packages will be affected (of 0 checked): Installed packages to be REINSTALLED: pkg-1.3.8_3 (needed shared library changed) The operation will free 301 KB. 2 MB to be downloaded. Proceed with this action? [y/N]: n server% pkg info pkg-1.3.8_3 pkg-1.3.8_3 Name : pkg Version : 1.3.8_3 Installed on : Fri Nov 28 06:31:33 EST 2014 Origin : ports-mgmt/pkg Architecture : freebsd:10:x86:64 Prefix : /usr/local Categories : ports-mgmt Licenses : BSD2CLAUSE Maintainer : portmgr@FreeBSD.org WWW : http://wiki.freebsd.org/pkgng Comment : Package manager Shared Libs required: libexecinfo.so.1 Shared Libs provided: libpkg.so.3 Flat size : 9.60MiB Description : Package management tool WWW: http://wiki.freebsd.org/pkgng server% pkg search -fe pkg-1.3.8_3 pkg-1.3.8_3 Name : pkg Version : 1.3.8_3 Installed on : Thu Jan 1 10:00:00 EST 1970 Origin : ports-mgmt/pkg Architecture : freebsd:10:x86:64 Prefix : /usr/local Repository : FreeBSD [pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/latest] Categories : ports-mgmt Licenses : BSD2CLAUSE Maintainer : portmgr@FreeBSD.org WWW : http://wiki.freebsd.org/pkgng Comment : Package manager Shared Libs provided: libpkg.so.3 Flat size : 9.31MiB Pkg size : 2 MB Description : Package management tool WWW: http://wiki.freebsd.org/pkgng server% The only obvious difference is the requirement for libexecinfo.so.1 in the installed version. The reason for this is unclear - it's not listed anywhere in the Makefile, though the configure script does test for it. It's present in the base system, though I also have libexecinfo-1.1_3 installed (as a requirement for llvm and samba) and ldd shows pkg is relying on the port: server% ldd /usr/local/sbin/pkg /usr/local/sbin/pkg: libpkg.so.3 => /usr/local/lib/libpkg.so.3 (0x80086f000) libelf.so.1 => /usr/lib/libelf.so.1 (0x800c3e000) libexecinfo.so.1 => /usr/local/lib/libexecinfo.so.1 (0x800e53000) libfetch.so.6 => /usr/lib/libfetch.so.6 (0x801056000) libutil.so.9 => /lib/libutil.so.9 (0x801268000) libssl.so.7 => /usr/lib/libssl.so.7 (0x80147a000) libcrypto.so.7 => /lib/libcrypto.so.7 (0x8016e4000) libm.so.5 => /lib/libm.so.5 (0x801ad7000) libjail.so.1 => /lib/libjail.so.1 (0x801cfd000) libarchive.so.6 => /usr/lib/libarchive.so.6 (0x801f02000) libz.so.6 => /lib/libz.so.6 (0x80219d000) libbz2.so.4 => /usr/lib/libbz2.so.4 (0x8023b3000) liblzma.so.5 => /usr/lib/liblzma.so.5 (0x8025c5000) libc.so.7 => /lib/libc.so.7 (0x8027ea000) libbsdxml.so.4 => /lib/libbsdxml.so.4 (0x802b86000) A friend who has also built pkg reports the same behaviour. There are multiple issues here: - Why is a freshly built pkg reporting it needs to be reinstalled? - Why doesn't pkg report details of why it needs to be reinstalled? Which shared library has changed and how? - Why is pkg linking against a library not listed as a dependency?
Maintainers CC'd
We are working on this.
I think could be closed pkg has 1.10.4.
I haven't seen this with recent versions of pkg so I'll assume it got fixed along the way.