Using a helper function to see if the algorithm works.

This commit is contained in:
emiliano.vavassori 2024-08-23 01:41:14 +02:00
parent f37b49a6fb
commit 62681b2aeb
1 changed files with 10 additions and 0 deletions

View File

@ -683,3 +683,13 @@ class Build():
if not self.debug:
# Cleaning up build directory
shutil.rmtree(self.builddir)
def libfinderhelper(libraryname):
"""Uses system tools to identify the missing package."""
libsearch = subprocess.run(shlex.split(
f"sudo apt-file find -lx {libraryname}$"
), check=True, capture_output=True)
candidate = [ x for x in libsearch.stdout.decode('utf-8').split('\n') if 'lib' in x ][0]
return candidate