[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A thought on urgency



On Tue, Sep 19, 2000 at 02:22:35PM -0600, Jason Gunthorpe wrote:
> On 19 Sep 2000, Manoj Srivastava wrote:
> >  Jason> I'd suggest the field look like:
> >  Jason> Urgency: high (< 1.2-3), medium (< 1.2-4), low (< 1.2-6)
> The only drawback from this approach is that it involves significantly
> more computation and memory than using simple serial numbers - but it is
> more readable. 

Assuming "Serial: 1274", you're looking at about 52kB of raw textual data
extra, once every package starts using it; assuming the full urgency field
like the above, you're looking at maybe 240kB of extra text (added to an
uncompressed Packages file that's already 3MB).

Depending on how you do it, it can involve an extra version comparison
for each package (if you don't have complicated things like "if you're
earlier than 1.2 the upgrade's low, but if you're 1.3 the upgrade's high,
but after that you're only low again) or k extra version comparisons
per package (if you do have extra stuff). For comparison, you're already
doing at least one version comparison for most packages (80%ish) since
they have versioned dependencies (libc >= 2.1.2, eg).

Since apt's version comparison is *very* fast anyway (the testing scripts
do zillions of version comparisons, and barely notice. Much faster than
using dpkg), and since you don't need to do anything if you just say
"install everything", I don't think this is a particular problem.

Some other notes: calculating an "Urgency" header like the above based
on the chnagelog is fairly straightforward, calculating a serial number
is a little trickier: if you set the first version in the changelog to
a serial number of 0, you can't remove the original versions from years
ago. Or at least, if you do, you have to take care of the serial number
some other way.

Also, one major difference between the two ways of doing things, given
a series of changes like:
	1.2-1 medium 
	1.2-2 medium 
	1.2-3 medium 
	1.2-4 medium
then an upgrade from 1.1-1 to 1.2-4 would be considered "medium" in
the "Urgency" case, but would be considered 4*medium (which I think
was 2*high?)  in the Serial number case.

I think the former behaviour makes more sense, personally but others
mileage may vary. If you've got something set up to only do high/security
uploads, should a number of lower-but-nonzero uploads eventually raise
a package's serial enough to get it on your machine?

YMMV, I guess. But I don't think the extra space or timing is likely to be
a really significant factor.

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

  ``We reject: kings, presidents, and voting.
                 We believe in: rough consensus and working code.''
                                      -- Dave Clark

Attachment: pgpQxiMCpePZU.pgp
Description: PGP signature


Reply to: