INNER CODE UNIT · Python

dependencies

CyrilPeng/Venera-Next · .github/scripts/appimage_runtime.py:48

def dependencies(path, library_path):
    result = subprocess.run(
        ["ldd", str(path)], text=True, capture_output=True,
        env={**os.environ, "LC_ALL": "C", "LD_LIBRARY_PATH": library_path},
    )
    if result.returncode:
        raise RuntimeError(f"Cannot inspect {path}: {result.stdout}{result.stderr}")
    return parse_ldd(result.stdout)


def copy_file(source, destination):
    destination.parent.mkdir(parents=True, exist_ok=True)
    # Dereference system links: an absolute link would escape the AppDir.
    shutil.copy2(source, destination)


def owning_package(source):
    # ldconfig may report /lib aliases on merged-/usr hosts while dpkg records

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…