pkg_upgrade (was Re: pkg_add does not backtrack, does it?)

Antony Mawer fbsd-hackers at mawer.org
Thu Feb 8 22:43:14 UTC 2007


On 8/02/2007 9:02 AM, Ulrich Spoerlein wrote:
> Kip Macy wrote:
>> On Wed, 7 Feb 2007, Joan Picanyol i Puig wrote:
>>
>>> I know what I'd like: a utility in the base system for binary upgrading
>>> of packages. More flexible logic in how the '-r' option is handled would
>>> be nice (being able to fetch all packages from All/ even if you are
>>> on RELENG). Doesn't
>>>
>>> freebsd-update fetch install && pkg_upgrade -a
>>>
>>> look nice for keeping up to date? The obvious hairy details must be
>>> harder than it seems, I'm sure others have considered it (and would have
>>> done it) before.
>> portupgrade -aPP
> 
> Requires a fully populated /usr/ports together with an up-to-date INDEX.
> 
> Not exactly what we are looking for here. I hacked together an ugly
> shell script, that will use pkg_version (it can grab the INDEX from the
> pkg-site via ftp) and gives you the feature to pkg_delete/pkg_add
> selected packages.

Yes - we found the same thing a few months ago when we were faced with 
upgrading a large number of packages on many systems in an automated 
manner. We wanted to build the packages ourselves (no problems there), 
then use portupgrade or something similar to handle fixing the 
dependency links in the package information.

We ended up having to push out a minimal /usr/ports/ tree of _just_ the 
packages we were updating and dependencies (enough to keep portupgrade 
happy and allow it to work), along with the package files and an INDEX 
file, and let portupgrade take it from there.

It was definitely a painful and kludgy process, and something that would 
be great to come up with an easier way of doing! Having to push out 
portupgrade (and ruby as a result) was a fairly bulky requirement just 
to upgrade some packages...

--Antony


More information about the freebsd-hackers mailing list