texlive-lancjk, texlive-langkorean: fix recursive dependency

Also tidy up python scripts
This commit is contained in:
Henrik Grimler 2019-03-31 22:03:43 +02:00 committed by Leonid Pliushch
parent 5dec1f47ca
commit 5da798198d
4 changed files with 11 additions and 10 deletions

View File

@ -1,8 +1,8 @@
#!/usr/bin/python3
# Tiny script to check if all texlive's subpackages contain conflicting files
with open("collections.txt", "r") as f:
pkgs = f.read().split("\n")
# print(pkgs)
files = {}
for pkg in pkgs:

View File

@ -4,7 +4,7 @@ def parse_tlpdb_to_dict(tlpdb_path):
"""Reads given tlpdb database and creates dict with packages and their dependencies and files
"""
with open(tlpdb, "r") as f:
with open(tlpdb_path, "r") as f:
packages = f.read().split("\n\n")
pkg_dict = {}
@ -54,10 +54,6 @@ def Files(*args, **kwargs):
files += get_files_in_package(prefix+pkg, [], [], visit_collections=bool_visit_collections)[0]
return files
import sys
tlpdb = sys.argv[2]
pkg_dict = parse_tlpdb_to_dict(tlpdb)
def get_conflicting_pkgs(package):
"""Returns list of packages that contain some files that are also found in 'package'.
These packages should be listed as dependencies.
@ -88,13 +84,13 @@ def get_conflicting_pkgs(package):
elif package == "bibtexextra":
return ["basic", "binextra"]
elif package == "langcjk":
return ["basic", "langkorean", "langother"]
return ["basic", "langother"]
elif package == "latexrecommended":
return ["basic", "fontsrecommended", "latexextra", "pictures", "plaingeneric"]
elif package == "mathscience":
return ["basic", "langgreek"]
elif package == "langkorean":
return ["langjapanese", "latexrecommended"]
return ["langjapanese", "langcjk", "latexrecommended"]
elif package == "latexextra":
return ["fontsextra"]
elif package == "humanities":
@ -110,6 +106,11 @@ def get_conflicting_pkgs(package):
else:
raise ValueError(sys.argv[1]+" isn't a known package name")
import sys
tlpdb = sys.argv[2]
pkg_dict = parse_tlpdb_to_dict(tlpdb)
if len(sys.argv) > 2 and sys.argv[-1] == "print_names":
"""Generate dependencies to put into TERMUX_SUBPKG_DEPENDS"""
# Strip latex and basic since those collections are part of termux package "texlive"

View File

@ -1,3 +1,3 @@
TERMUX_SUBPKG_DESCRIPTION="Texlive's collection-langcjk"
TERMUX_SUBPKG_DEPENDS="texlive, texlive-langkorean, texlive-langother"
TERMUX_SUBPKG_DEPENDS="texlive, texlive-langother"
TERMUX_SUBPKG_INCLUDE=$(python3 $TERMUX_PKG_BUILDER_DIR/parse_tlpdb.py $(echo $SUB_PKG_NAME | awk -F"-" '{print $2}') $TERMUX_PKG_TMPDIR/texlive.tlpdb)

View File

@ -1,3 +1,3 @@
TERMUX_SUBPKG_DESCRIPTION="Texlive's collection-langkorean"
TERMUX_SUBPKG_DEPENDS="texlive, texlive-langjapanese, texlive-latexrecommended"
TERMUX_SUBPKG_DEPENDS="texlive, texlive-langjapanese, texlive-langcjk, texlive-latexrecommended"
TERMUX_SUBPKG_INCLUDE=$(python3 $TERMUX_PKG_BUILDER_DIR/parse_tlpdb.py $(echo $SUB_PKG_NAME | awk -F"-" '{print $2}') $TERMUX_PKG_TMPDIR/texlive.tlpdb)