Hi maintainers,
It would be useful to have the ability to apt-get update a single
repository, without touching the state of other repositories or
downloading their package lists. Updating a single sources.list.d file
would also suffice, and might be easier in terms of syntax.
The primary use case for this would be sbuild: currently, the apt resolver
needs to create a new repository inside the chroot and make apt aware of
it, but if sbuild is run without --apt-update, running `apt-get update`
(which updates every repository) would be inappropriate. So it resorts to
doing some black magic to write out the appropriate /var/lib/apt/lists/
file without actually invoking apt:
http://sources.debian.net/src/sbuild/0.64.0-1/lib/Sbuild/ResolverBase.pm#L179
Being able to run `apt-get update sbuild-build-depends-archive.list` or
something would be much cleaner.
The reason I care about this is that I'm hoping to extend sbuild to allow
adding a new repository at the sbuild command line to provide build
dependencies for the current build only (see bug #700522). I'd rather not
add code to do _more_ of the black magic, and would prefer that apt had a
documented interface to take a new sources.list.d file into account
without updating everything else.
There's also a use case for "normal" end users with lots of repositories,
where a full `apt-get update` takes a while, and they're only looking for
a package in a specific repository.
I tried writing a patch for this, but the most obvious approach ended up
with apt thinking that one sources.list.d file was the _only_ one
configured (and forgetting all other repositories). Patch is attached
because why not; I haven't had time to look into making it work properly,
yet, but might end up doing so eventually.