@@ -89,6 +89,7 @@ def verify(path, sha_path, verbose):
89
89
" expected: {}" .format (found , expected ))
90
90
return verified
91
91
92
+
92
93
def unpack (tarball , dst , verbose = False , match = None ):
93
94
print ("extracting " + tarball )
94
95
fname = os .path .basename (tarball ).replace (".tar.gz" , "" )
@@ -208,13 +209,13 @@ def fix_executable(self, fname):
208
209
return
209
210
210
211
# At this point we're pretty sure the user is running NixOS
211
- print ("Info : you seem to be running NixOS. Attempting to patch " + fname )
212
+ print ("info : you seem to be running NixOS. Attempting to patch " + fname )
212
213
213
214
try :
214
215
interpreter = subprocess .check_output (["patchelf" , "--print-interpreter" , fname ])
215
216
interpreter = interpreter .strip ().decode (default_encoding )
216
217
except subprocess .CalledProcessError as e :
217
- print ("Warning : failed to call patchelf: %s" % e )
218
+ print ("warning : failed to call patchelf: %s" % e )
218
219
return
219
220
220
221
loader = interpreter .split ("/" )[- 1 ]
@@ -223,7 +224,7 @@ def fix_executable(self, fname):
223
224
ldd_output = subprocess .check_output (['ldd' , '/run/current-system/sw/bin/sh' ])
224
225
ldd_output = ldd_output .strip ().decode (default_encoding )
225
226
except subprocess .CalledProcessError as e :
226
- print ("Warning : unable to call ldd: %s" % e )
227
+ print ("warning : unable to call ldd: %s" % e )
227
228
return
228
229
229
230
for line in ldd_output .splitlines ():
@@ -232,15 +233,15 @@ def fix_executable(self, fname):
232
233
loader_path = libname [:len (libname ) - len (loader )]
233
234
break
234
235
else :
235
- print ("Warning : unable to find the path to the dynamic linker" )
236
+ print ("warning : unable to find the path to the dynamic linker" )
236
237
return
237
238
238
239
correct_interpreter = loader_path + loader
239
240
240
241
try :
241
242
subprocess .check_output (["patchelf" , "--set-interpreter" , correct_interpreter , fname ])
242
243
except subprocess .CalledProcessError as e :
243
- print ("Warning : failed to call patchelf: %s" % e )
244
+ print ("warning : failed to call patchelf: %s" % e )
244
245
return
245
246
246
247
def stage0_cargo_rev (self ):
0 commit comments