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

Re: Upcoming version of apt-file - using apt-acquire and incompatibilities



On Tue, Dec 08, 2015 at 09:16:33AM +0100, Vincent Danjean wrote:
> Le 06/12/2015 13:01, David Kalnischkies a écrit :
> > On Sat, Dec 05, 2015 at 07:58:07AM -0500, The Wanderer wrote:
> >> Will it still be possible to update just the apt-file index, separately
> >> from updating the main package index? I see no indication in the current
> >> apt(8) man page of a way to tell apt to do this.
> > 
> > You can't update individual indexes at the moment. The question is why
> > you would want to as from my point of view that was a pretty annoying
> > technical detail that I had to run two (or three [debtags] or more)
> > commands to get all the metadata.
> 
>   On most of my systems, I use i386 in addition to amd64. On my main
> laptop, I even use armel and mipsel as I need cross-compilers for some
> teaching exercises. Moreover, to be able to easily install packages
> from various suite, I've stable, testing, unstable, sid and experimental
> in my sources.list (and a few more such as various security, backport, ...)

I have a pretty similar setup actually. You might want to look into
sources.list manpage and especially the 'Targets' option to finetune for
which sources [and potentially which architectures] Contents files are
acquired. You hadn't really a choice with apt-file before and that
always annoyed me, so having this highly (and relatively easy)
configureable for a user was a high priority for me (it at least sounds
a bit like if you wanted that to implement further down by hand in your
apt-file-update script). Feel free to suggest something if you have
further ideas!


>   Now, each apt{-get} update will update all Contents-Files for
> *all architectures* and *all suites*. I do not want that. It takes
> too long for data I do not need. It is especially annoying when I'm
> traveling, that I've only a limited (speed and/or size) data link
> and that I must upgrade/install a package.

While the intial cost of getting the Contents files is enormous, keeping
them up-to-date is a matter of a few kilobytes. Most websites you will
visit on the go have a (much) larger footprint on their frontpage, so
I would suggest trying it out first if it really has the problems in
practice you envision it to have before rushing into action.


>   I will try to find a setup so that "apt-get update" does not
> download Contents-Files (should be just commenting out the new
> config file if I correctly read this thread) and create a

It is a matter of having a config file with:
Acquire::IndexTargets {
	deb::Contents-deb::DefaultEnabled "false";
	deb-src::Contents-dsc::DefaultEnabled "false";
};
to have downloads for apt-file disabled by default.
You could then enable it for specific sources in sources.list with the
already mentioned Targets option.

I wouldn't advice mixing apt runs with the option globally disabled and
enabled as the cleanup will garbage collect files from the download
cache apt hasn't downloaded in the current run – and why the cleanup
shouldn't be disabled I mentioned in another reply in this thread:
<[🔎] 20151208123546.GA11777@crossbow>

The cleanest solution if you really want to go this way is probably
a virtual environment in which the sources.list includes only Contents
sources. I guess apt-venv could do that, but I haven't used that. I tend
to set up such environments via apts test framework…


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature


Reply to: