texlive-lancjk, texlive-langkorean: fix recursive dependency
Also tidy up python scripts
This commit is contained in:
parent
5dec1f47ca
commit
5da798198d
@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
# Tiny script to check if all texlive's subpackages contain conflicting files
|
||||||
with open("collections.txt", "r") as f:
|
with open("collections.txt", "r") as f:
|
||||||
pkgs = f.read().split("\n")
|
pkgs = f.read().split("\n")
|
||||||
# print(pkgs)
|
|
||||||
|
|
||||||
files = {}
|
files = {}
|
||||||
for pkg in pkgs:
|
for pkg in pkgs:
|
||||||
|
@ -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
|
"""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")
|
packages = f.read().split("\n\n")
|
||||||
|
|
||||||
pkg_dict = {}
|
pkg_dict = {}
|
||||||
@ -54,10 +54,6 @@ def Files(*args, **kwargs):
|
|||||||
files += get_files_in_package(prefix+pkg, [], [], visit_collections=bool_visit_collections)[0]
|
files += get_files_in_package(prefix+pkg, [], [], visit_collections=bool_visit_collections)[0]
|
||||||
return files
|
return files
|
||||||
|
|
||||||
import sys
|
|
||||||
tlpdb = sys.argv[2]
|
|
||||||
pkg_dict = parse_tlpdb_to_dict(tlpdb)
|
|
||||||
|
|
||||||
def get_conflicting_pkgs(package):
|
def get_conflicting_pkgs(package):
|
||||||
"""Returns list of packages that contain some files that are also found in 'package'.
|
"""Returns list of packages that contain some files that are also found in 'package'.
|
||||||
These packages should be listed as dependencies.
|
These packages should be listed as dependencies.
|
||||||
@ -88,13 +84,13 @@ def get_conflicting_pkgs(package):
|
|||||||
elif package == "bibtexextra":
|
elif package == "bibtexextra":
|
||||||
return ["basic", "binextra"]
|
return ["basic", "binextra"]
|
||||||
elif package == "langcjk":
|
elif package == "langcjk":
|
||||||
return ["basic", "langkorean", "langother"]
|
return ["basic", "langother"]
|
||||||
elif package == "latexrecommended":
|
elif package == "latexrecommended":
|
||||||
return ["basic", "fontsrecommended", "latexextra", "pictures", "plaingeneric"]
|
return ["basic", "fontsrecommended", "latexextra", "pictures", "plaingeneric"]
|
||||||
elif package == "mathscience":
|
elif package == "mathscience":
|
||||||
return ["basic", "langgreek"]
|
return ["basic", "langgreek"]
|
||||||
elif package == "langkorean":
|
elif package == "langkorean":
|
||||||
return ["langjapanese", "latexrecommended"]
|
return ["langjapanese", "langcjk", "latexrecommended"]
|
||||||
elif package == "latexextra":
|
elif package == "latexextra":
|
||||||
return ["fontsextra"]
|
return ["fontsextra"]
|
||||||
elif package == "humanities":
|
elif package == "humanities":
|
||||||
@ -110,6 +106,11 @@ def get_conflicting_pkgs(package):
|
|||||||
else:
|
else:
|
||||||
raise ValueError(sys.argv[1]+" isn't a known package name")
|
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":
|
if len(sys.argv) > 2 and sys.argv[-1] == "print_names":
|
||||||
"""Generate dependencies to put into TERMUX_SUBPKG_DEPENDS"""
|
"""Generate dependencies to put into TERMUX_SUBPKG_DEPENDS"""
|
||||||
# Strip latex and basic since those collections are part of termux package "texlive"
|
# Strip latex and basic since those collections are part of termux package "texlive"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
TERMUX_SUBPKG_DESCRIPTION="Texlive's collection-langcjk"
|
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)
|
TERMUX_SUBPKG_INCLUDE=$(python3 $TERMUX_PKG_BUILDER_DIR/parse_tlpdb.py $(echo $SUB_PKG_NAME | awk -F"-" '{print $2}') $TERMUX_PKG_TMPDIR/texlive.tlpdb)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
TERMUX_SUBPKG_DESCRIPTION="Texlive's collection-langkorean"
|
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)
|
TERMUX_SUBPKG_INCLUDE=$(python3 $TERMUX_PKG_BUILDER_DIR/parse_tlpdb.py $(echo $SUB_PKG_NAME | awk -F"-" '{print $2}') $TERMUX_PKG_TMPDIR/texlive.tlpdb)
|
||||||
|
Loading…
Reference in New Issue
Block a user