pkg does bad things after upgrade from 8.4 to 9.3

Michael B. Eichorn ike at
Tue Sep 8 20:53:42 UTC 2015

On Tue, 2015-09-08 at 13:53 -0400, Michael R. Wayne wrote:
> I brought this up on irc, did not get a helpful answer.
> After upgrading a machine from 8.4 to 9.3, I went to upgrade 
> ports/packages. Some need to be built from source as they 
> use non-standard options but most should be installable directly
> with pkg install.
> Note that both pkg and pkg-devel exhibit the same problem.
> Some install just fine. Others do NASTY things. 
> Here, I show that zip installs properly. But bash wants to 
> delete TOTALLY UNRELATED things (why would bash want to delete
> mutt and apache?)

At a glance, bash has a library dependency to gettext-runtime which is in
turn a library dependecy of 2000+ ports. You hit dependency hell. Gettext
is like libc or perl, touch it any everything needs updated.
> I then did a
>    pkg update -F
> which fetched the world, then wanted to reinstall everything (to
> which I said no) and the problem continues:

But you must reinstall everything. You upgraded your ABI going 8->9 so
everything needs rebuilt/reinstalled. See next.
> It looks like, in part, pkg can not determine what files are installed:

Not sure about this one, but you are pretty far off the reservation after
not doing a '# pkg-static upgrade -f' or '# portmaster -af' as per
FreeBSD Handbook

> Is there some way I can force pkg to install individual packages and
> not
> touch the unrelated things? This behaviour seems very flawed to me but
> the irc chat suggests I'm missing something.

There is pkg-lock(8) but dont do it. You really need to upgrade it all
for a major version change.

My guess is that everything works fine if you follow the handbook/manual.
Mixing ports and packages is hard to do at present, but it is being
actively worked on. Poudriere is probably the best solution for mixing
them at present.

> Guidance on how to proceed would be appreciated. Note, again, that
> I can not simply pkg update all ports as some must be built from
> source.

Multiple ways to do this, at least the following occur to me (in no
particular order):
1) poudriere. If you have another machine/VPS you can build the ports you
modify as packages and overlay it on top of the freebsd repo (least work
on the target system).
2) uninstall the custom ports, upgrade with pkg, rebuild custom ports
(most human work)
3) use portmaster or your port management software of choice and rebuild
all of the ports from source, eg '# portmaster -af'. (most machine work,
least human work)

I am sure others with more experiance than myself may have other/better
alternatives. I am rather newer at this than most on the list so consider
this response to be from an informed non-expert user, rather than an
truely authoritative answer.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5761 bytes
Desc: not available
URL: <>

More information about the freebsd-stable mailing list