7
7
8
8
def setup ():
9
9
global args , workdir
10
- programs = ['ruby' , 'git' , 'apt-cacher-ng' , ' make' , 'wget' ]
10
+ programs = ['ruby' , 'git' , 'make' , 'wget' ]
11
11
if args .kvm :
12
- programs += ['python-vm-builder' , 'qemu-kvm' , 'qemu-utils' ]
13
- elif args .docker :
12
+ programs += ['apt-cacher-ng' , ' python-vm-builder' , 'qemu-kvm' , 'qemu-utils' ]
13
+ elif args .docker and not os . path . isfile ( '/lib/systemd/system/docker.service' ) :
14
14
dockers = ['docker.io' , 'docker-ce' ]
15
15
for i in dockers :
16
16
return_code = subprocess .call (['sudo' , 'apt-get' , 'install' , '-qq' , i ])
17
17
if return_code == 0 :
18
18
break
19
19
if return_code != 0 :
20
- print ('Cannot find any way to install docker ' , file = sys .stderr )
21
- exit (1 )
20
+ print ('Cannot find any way to install Docker. ' , file = sys .stderr )
21
+ sys . exit (1 )
22
22
else :
23
- programs += ['lxc' , 'debootstrap' ]
23
+ programs += ['apt-cacher-ng' , ' lxc' , 'debootstrap' ]
24
24
subprocess .check_call (['sudo' , 'apt-get' , 'install' , '-qq' ] + programs )
25
25
if not os .path .isdir ('gitian.sigs' ):
26
26
subprocess .check_call (['git' , 'clone' , 'https://github.com/bitcoin-core/gitian.sigs.git' ])
@@ -41,7 +41,7 @@ def setup():
41
41
if args .is_bionic and not args .kvm and not args .docker :
42
42
subprocess .check_call (['sudo' , 'sed' , '-i' , 's/lxcbr0/br0/' , '/etc/default/lxc-net' ])
43
43
print ('Reboot is required' )
44
- exit (0 )
44
+ sys . exit (0 )
45
45
46
46
def build ():
47
47
global args , workdir
@@ -165,8 +165,8 @@ def main():
165
165
args .is_bionic = b'bionic' in subprocess .check_output (['lsb_release' , '-cs' ])
166
166
167
167
if args .buildsign :
168
- args .build = True
169
- args .sign = True
168
+ args .build = True
169
+ args .sign = True
170
170
171
171
if args .kvm and args .docker :
172
172
raise Exception ('Error: cannot have both kvm and docker' )
@@ -193,11 +193,11 @@ def main():
193
193
if args .signer == '' :
194
194
print (script_name + ': Missing signer.' )
195
195
print ('Try ' + script_name + ' --help for more information' )
196
- exit (1 )
196
+ sys . exit (1 )
197
197
if args .version == '' :
198
198
print (script_name + ': Missing version.' )
199
199
print ('Try ' + script_name + ' --help for more information' )
200
- exit (1 )
200
+ sys . exit (1 )
201
201
202
202
# Add leading 'v' for tags
203
203
if args .commit and args .pull :
0 commit comments