[freebsd-questions] Looking @ upgrades mechanisms...
fbsd.questions at rachie.is-a-geek.net
Tue Dec 2 10:41:50 PST 2008
On Tuesday 02 December 2008 19:03:44 Boris Samorodov wrote:
> Mel <fbsd.questions at rachie.is-a-geek.net> writes:
> > On Tuesday 02 December 2008 17:13:58 andrew clarke wrote:
> >> On Tue 2008-12-02 09:28:44 UTC+0100, Mel
> > (fbsd.questions at rachie.is-a-geek.net) wrote:
> >> > Portupgrade -PP is detrimental for bandwidth. It's not really
> >> > portupgrade's fault (well, partially, it shouldn't offer the feature),
> >> > because it will quite often download Latest/foo.tbz, unpack it
> >> > entirely and then say "oops, I downloaded this useless package which
> >> > is older or equal to what you have installed".
> >> Yes, this happens. -PP is not ideal for regular updates but it's
> >> still useful for when you have a new FreeBSD install with no packages
> >> installed, and want to get up and running quickly, grabbing the most
> >> recent binaries of all your favourite ports instead of building them
> >> all from source.
> > That's infinitely slower than pkg_add -r <list of leaves>.
> Don't use "portupgrade -NPP <package>". ;-)
> But "portupgrade -PP <package>" really *upgrades* packages.
Don't assume that the @pkgdep lines in a given package on the FreeBSD servers
will always point to an existing package. If it doesn't, watch what happens:
Latest/foo.tbz based on s/@name (.*)-[^-]+$/$1/
extract foo.tbz entirely, rather then just +CONTENTS which is the first file
in the tar archive
find out that foo = foo-older-then-installed and discard the package
I've solved this myself with an index format like this:
# bzcat /var/pkg/7-stable/All/INDEX.bz2 |tail -1
High level view: Compare btree of /var/db/pkg with btree of indexfile,
download and upgrade.
Saves bogus downloads and doesn't need a portstree. Cons: buildserver needs to
periodically create the index, index needs to be downloaded.
Problem with today's modular software: they start with the modules
and never get to the software part.
More information about the freebsd-questions