On Tuesday 02 December 2008 19:03:44 Boris Samorodov wrote:
> Mel <[EMAIL PROTECTED]> writes:
> > On Tuesday 02 December 2008 17:13:58 andrew clarke wrote:
> >> On Tue 2008-12-02 09:28:44 UTC+0100, Mel
> >
> > ([EMAIL PROTECTED]) 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
archivers/zip:zip-3.0.tbz:72f4fcc337c74240eaa8ae989a452835231fe7ff32c7469094e3a5fe411d7430:181194

$origin:$pkgname.tbz:$sha256:$size

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.
-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to