[buildd-tools-devel] Bug#714883: sbuild: Support --add-repository to add an apt source for just one build

Geoffrey Thomas gthomas at mokafive.com
Thu Jul 4 07:14:46 UTC 2013


On Wed, 3 Jul 2013, Geoffrey Thomas wrote:

>>> Also want to take a crack at --add-repository? :-) [...]
>> 
>> It would a really nice thing to do but I'm not sure I will have the time
>> to look into that. :(
>> 
>> Is there an already open bug report for apt-get mentioning our use case
>> or would you care to open it? They seems two different issues and it
>> would be unfortunate to lose track of it once this bug gets closed.
>
> I just reported #714877 to apt, with the partial work I did. I'm also cloning 
> my original bug to a separate report for --add-repository, since that's a 
> separate request from --add-(extra)-package.

I got a response pretty quickly from one of the apt maintainers pointing 
out that this can be done with apt-get as presently implemented, which is 
exciting, especially because this will work on existing chroots without 
requiring an apt upgrade. So I've implemented that suggestion on my Github 
branch (rebased on top of current master), and my existing patch for 
--add-repository now works properly.

https://github.com/geofft/sbuild/tree/add-package

The trick is that you can use apt-get update with -o Dir::Etc::sourcelist 
to point to the file, -o Dir::Etc::sourceparts pointing at an empty 
directory, and -o APT::List-Cleanup=0. Since this allows cleaning up the 
existing code in update_archive(), my first commit does this:

https://github.com/geofft/sbuild/commit/557d3946e9fcbd709e003c05fcb211315dab1fab

I think it'd be good to merge that patch now, since that's pure cleanup of 
existing code.

-- 
Geoffrey Thomas
gthomas at mokafive.com



More information about the Buildd-tools-devel mailing list