Michael B. Eichorn
2015-Sep-08 20:55 UTC
pkg does bad things after upgrade from 8.4 to 9.3
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?) > http://www.wayne47.com/fbsd_issue.htmlAt 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: > http://www.wayne47.com/fbsd3.htmlBut 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: > http://www.wayne47.com/fbsdbug.htmlNot 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 23.2.3.3> > 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. Regards, Ike -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5761 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20150908/a86bc630/attachment.bin>
> Am 08.09.2015 um 22:55 schrieb Michael B. Eichorn <ike at michaeleichorn.com>: > > > > But you must reinstall everything. You upgraded your ABI going 8->9 so > everything needs rebuilt/reinstalled. See next. >>Exactly. Or unpack the compat8x package by hand. Or don?t delete the old libraries upon upgrading?>> > > There is pkg-lock(8) but dont do it. You really need to upgrade it all > for a major version change. >The valid use-case for pkg-lock is (IMO) if you want to downgrade. I follow the quarterly cuts of the ports-tree and build my own repo. If I need to downgrade from Q3 to Q2, I usually lock pkg only and do a pkg upgrade -f The lock ?survives? even the -f. The previous pkg may have problems reading the new pkg database created by the new pkg?. Locking anything else besides pkg is just a way to get unhappy. If you have more than a handful machines or are not content with the packages provided by FreeBSD, running your own repo is a must IMO. For our Ubuntu and CentOS-servers at work, we don?t do the builds ourselves - but we still run our own mirror that is updated at our own schedule (so that servers are on a defined patch-level).