On Mon, May 23, 2005 at 09:46:08PM +1000, Andrew Lau wrote:
> Some programs like apt-get use retrieve "Packages.gz", while others like
> pbuilder download "Packages". So unfortuantely the deb-cache can easily
> become 50% larger (with obsolete debs) than it should be once either the
> Packages or Packages.gz for a single repository falls into disuse.

By disuse, do you mean it's still listed in approx.conf, but clients
are no longer using it in their sources.list files?  If so, you're
right -- gc_approx doesn't have any option to "delete files older than
N days" (which is probably better done using "find" in a cron job
anyway), under the assumption that you might want, say, a local mirror
of stable, which might have multi-year-old debs in it.

I might be missing your point though.  Is the issue having both
Packages and Packages.gz files in the cache, when only one would
suffice?

> I suggest that gc_approx should only preserve packages listed in the
> newest Packages, Packages.gz or even Packages.bz2 file.

I'm not sure I understand this point, because I think that's what it
does now. BTW, can you point me to repositories with bzip2-compressed
Packages files out there?  I haven't come across any myself, but it
should be easy to add support for them.

> The only problem is that you have to assume the user is smart enough to
> rerun the update operation (eg pbuilder update) before trying to
> download in case all the Packages.* are out of sync.

OK, so I guess the issue is having Packages inconsistent with
Packages.gz for a given distribution, because, say, one was downloaded
by apt-get and the other by pbuilder?  Good point -- I'll look into
it.

I thought I could avoid having approx do tricks like uncompressing
Packages.gz files in response to requests for plain Packages (I'd
prefer the client to do that!), but I might have to add that.

I'm surprised pbuilder doesn't prefer the compressed version, but I
haven't used it.  I'll start using it, if only as another test client
for approx.  Thanks for the report.

-- 
Eric Cooper             e c c @ c m u . e d u


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to