Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 2013 01:30:59 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        bob@immure.com
Cc:        jdc@koitsu.org, bsd-lists@1command.com, freebsd-stable@FreeBSD.org
Subject:   Re: portupgrade(1) | portmaster(8) -- which is more effective for large upgrade?
Message-ID:  <201306270831.r5R8Ux8l005194@gw.catspoiler.org>
In-Reply-To: <20130626211719.GB95647@rancor.immure.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 26 Jun, Bob Willcox wrote:
> On Wed, Jun 26, 2013 at 01:23:32PM -0700, Jeremy Chadwick wrote:
>> On Wed, Jun 26, 2013 at 09:42:43AM -0700, Chris H wrote:
>> > Greetings,
>> >  I haven't upgraded my tree(s) for awhile. My last attempt to rebuild after an updating
>> > src && ports, resulted in nearly installing the entire ports tree, which is why I've
>> > waited so long. Try as I might, I've had great difficulty finding something that will
>> > _only_ upgrade what I already have installed, _and_ respect the "options" used during the
>> > original make && make install, or those options expressed in make.conf.
>> > As portupgrade(1) && portmaster(8) appear to be the most used in this scenario,
>> > I'm soliciting opinions on which of these works best, or if there is something else to
>> > better manage this situation. Is there such a thing as a FreeBSD upgrade "easy button"?
>> 
>> Use portmaster, avoid portupgrade.  And no I will not expand on my
>> reasoning -- I urge anyone even mentioning the word portupgrade to spend
>> a few hours of their day reading the horror stories on the mailing lists
>> over the past 10 years or so (including recently).  Choose wisely.
> 
> Well, just to offer a counter-opinion here, I use portupgrade and feel that it
> has improved significantly over the past year or two and has become quite
> usable. I run it every two to four weeks on about five systems and haven't had
> any problems with it in a long time. However, YMMV.

I'm also a long-time portupgrade user, though I've been running locally
tweaked versions for quite some time.  Currently I'm using the patch
from the PR ports/177365, which makes the -a -f and -r options play
together much better.

I always start my upgrades by running
  portupgrade -aFc
to fetch any needed distfiles and configure all the port options.  That
avoids breakage in the middle of the upgrade from an unfetchable
distfile, and avoids interactive pauses in the middle of the upgrade to
set options.

In my latest upgrade, I had to deal with the ruby version change as well
as the perl upgrade and the audio/flac library version bump.  On my sole
10-CURRENT machine, I just followed the initial steps listed in UPDATING
for the ruby version change, and then ran:
 portupgrade -afx ruby-1.8.\* -r lang/ruby18 lang/perl5.12 audio/flac
That upgrades all the ports that are out of date and rebuilds all the
ports that depend on the explictly listed ports, all in the correct
dependency order.

For my 8-STABLE machines, I build pkgng packages on one machine and then
use pkg to upgrade the others.  I build the packages in three steps:

 portupgrade -nfx ruby-1.8.\* -r lang/ruby18 lang/perl5.12 audio/flac >f

 edit the file "f" to get the list of the origins of the ports that
 would be upgraded

 portugrade -fpr `cat f`

I do this so that if port "foo" gets upgraded because it is out of date,
I want to rebuild all the packages that depend on "foo".  The reason for
that is if I install package "bar" that depends on "foo", I want pkg to
also install the correct version of "foo".

If I feel ambitious, I might tweak portouprade so that it can handle
this internally instead of having to do the extra steps manually.  On
the other hand, I might switch to poudriere, which is probably a better
solution.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306270831.r5R8Ux8l005194>