@@ -249,7 +249,10 @@ def install_x86_support_libraries(gha_build=False):
249
249
# Install them.
250
250
run_command (['dpkg' , '--add-architecture' , 'i386' ], as_root = True , check = True )
251
251
run_command (['apt' , 'update' ], as_root = True , check = True )
252
- run_command (['apt' , 'install' , '-V' , '-y' ] + packages , as_root = True , check = True )
252
+ process = run_command (['apt' , 'install' , '-V' , '-y' , '-f' ] + packages , as_root = True )
253
+ if process .returncode != 0 :
254
+ # Some dependency couldn't be installed, allow apt to fix things.
255
+ run_command (['apt' , 'upgrade' , '--with-new-pkgs' ], as_root = True , check = True )
253
256
254
257
if gha_build :
255
258
# One more workaround: downgrading libpcre2-8-0 above may have uninstalled
@@ -260,3 +263,5 @@ def install_x86_support_libraries(gha_build=False):
260
263
# Note: "-f" = "fix" - let apt do what it needs to do to fix dependencies.
261
264
run_command (['apt' , 'install' , '-f' , '-V' , '-y' , 'libsecret-1-dev' ],
262
265
as_root = True , check = True )
266
+ # Allow apt to fix anything else that's broken.
267
+ run_command (['apt' , 'upgrade' , '--with-new-pkgs' ], as_root = True , check = True )
0 commit comments