Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Jul 2008 13:43:15 +0400
From:      Andrew Kolchoogin <andrew@rinet.ru>
To:        freebsd-stable@freebsd.org
Subject:   Re: installdate of a port/package?
Message-ID:  <1215078195.9029.22.camel@akela>
In-Reply-To: <486AAB93.1050606@menhennitt.com.au>
References:  <op.udmcifpl8527sy@guido.klop.ws> <486AAB93.1050606@menhennitt.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Wed, 02/07/2008 =D0=B2 08:11 +1000, Graham Menhennitt writes:

> Ronald Klop wrote:
> > I just upgraded a machine from FreeBSD 6 to 7. Very nice.
> > But my portupgrade -fa failed after a while.
> > ...
> > How do I know which ports I still need to update?
> Run "portupgrade -fan" ...
    ... and it will suggest you to reinstall/upgrade everything. :)

    "portupgrade -an" will do suggest you to upgrade only outdated
packages, but trouble in question is in that there is no way to
determine what version of FreeBSD package was built on, neither using
base system utilities, nor using tools from ports-mgmt/ -- one may
suggest me to do this the way Gentoo's "revdep-rebuild" script does --
i.e., using ldd to determine which version of libc.so executable in
question is linked with, asking pkg_info about what port contains the
file and rebuilding such a port with portupgrade, this method is more or
less good, but it is not a universal one.

    First of all, there're statically linked executables. Oh, well, one
might use "strings" to extract them from executable and try to guess C
compiler version executable was built with, but, in my opinon, human
trying to rely on method described above is a "dangerous sharlatan" (C)
opensolaris.org, BrandZ community. :)

    Second, there're a couple of ports that contains only libraries, and
there're TONS of software which doesn't use advanced capabilities of
modern link editors that are able to link one shared library with
others, thus giving a large chance to run-time link editor to choke from
incorrect versions of shared libraries, and making our first method of
determining fairly useless.

    At last, but not at least, one can rely on versioned symbols, but
this method can be used when people will upgrade old and obsolete
RELENG_7 to modern and sexy RELENG_8, :) so I will not discuss it here
at least in three years. ;)

    Conclusion: when you're upgrading from (n-1).x to n.x and starting
"portupgrade -fa", in my opinion, the only safe choice in a case of
"portupgrade -fa" faults is to start it again (oh-eh!).
It's feasible, though, to avoid use of "portupgrade -fa" -- prepare list
of packages with dependencies using "portupgrade -nfa" and use the
simplest shell statement:

for i in `cat package-list`; do portupgrade -f $i; done
--=20
Andrew Kolchoogin <andrew@rinet.ru>
Cronyx Plus LLC




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