INNER CODE UNIT · Python
destination
CyrilPeng/Venera-Next · .github/scripts/appimage_runtime.py:113
destination = lib / source.name
if not destination.exists():
copy_file(source, destination)
pending.append(destination)
# Preserve redistribution notices for every dependency package.
packages.add(owning_package(source))
notices = appdir / "usr/share/doc/venera-next-runtime"
for package in sorted(packages):
copyright_file = Path("/usr/share/doc") / package.split(":")[0] / "copyright"
if not copyright_file.is_file():
raise RuntimeError(f"Missing copyright notice for {package}")
copy_file(copyright_file, notices / (package.replace(":", "_") + ".copyright"))
(notices / "packages.txt").write_text(
output("dpkg-query", "-W", "-f=${Package}\t${Version}\n", *sorted(packages)),
encoding="utf-8",
)