[elbe-devel] [PATCH 3/4] pbuilder: Handle mirror's options

Olivier Dion dion at linutronix.de
Thu Jul 16 17:07:05 CEST 2020


On Wed, 15 Jul 2020, Torben Hohn <torben.hohn at linutronix.de> wrote:
> On Tue, Jun 30, 2020 at 12:05:18PM -0400, Olivier Dion wrote:
>> diff --git a/elbepack/pbuilder.py b/elbepack/pbuilder.py
>> index 6f266a93..21d952a3 100644
>> --- a/elbepack/pbuilder.py
>> +++ b/elbepack/pbuilder.py
>> @@ -140,50 +131,73 @@ def pbuilder_write_repo_hook(builddir, xml, cross):
>>      with open(os.path.join(pbuilder_hook_dir, "H10elbe_apt_update"), "w") as f:
>>          f.write("#!/bin/sh\napt update\n")
>>  
>> -    fp = open(os.path.join(pbuilder_hook_dir, "G10elbe_apt_sources"), "w")
>> +    with open(os.path.join(pbuilder_hook_dir, "G10elbe_apt_sources"), "w") as f:
>> +
>> +        mirrors, keys = get_apt_mirrors_and_keys(builddir, xml, cross)
>> +
>> +        f.write("#!/bin/sh\n")
>> +
>> +        f.write("cat -> /etc/apt/sources.list <<EOF\n%s\nEOF\n" %
>
>                         -> ???

cat reads from stdin (-) and redirect (>) to /etc/apt/sources.list.

-- 
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen


More information about the elbe-devel mailing list