From 6ba99db56ca1cdb9e99a3f5a6d23e91b07fd6377 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Fri, 23 Aug 2024 01:48:47 +0200 Subject: [PATCH] Corrected code to use helper function. --- src/loaih/build.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/loaih/build.py b/src/loaih/build.py index 9e18b7c..a01eabc 100644 --- a/src/loaih/build.py +++ b/src/loaih/build.py @@ -575,14 +575,7 @@ class Build(): subprocess.run(['sudo', 'apt-file', 'update'], check=True) # Let's try to find and install also other libraries - additional = [] - for lib in not_found: - libsearch = subprocess.run(shlex.split( - f"sudo apt-file find -lx {lib}$" - ), check=True, capture_output=True) - candidate = [ x for x in libsearch.stdout.decode('utf-8').split(r"\n") if 'lib' in x ][0] - additional.append(candidate) - + additional = list(dict.fromkeys([ libfinderhelper(x) for x in not_found ])) debs.extend(additional) # We download the missing dependencies leveraging apt