Browse Source

texlive-lancjk, texlive-langkorean: fix recursive dependency

Also tidy up python scripts
emacs-27
Henrik Grimler 6 years ago
committed by Leonid Plyushch
parent
commit
06a569416e
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 2
      packages/texlive/check_for_conflicts.py
  2. 15
      packages/texlive/parse_tlpdb.py
  3. 2
      packages/texlive/texlive-langcjk.subpackage.sh
  4. 2
      packages/texlive/texlive-langkorean.subpackage.sh

2
packages/texlive/check_for_conflicts.py

@ -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:

15
packages/texlive/parse_tlpdb.py

@ -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"

2
packages/texlive/texlive-langcjk.subpackage.sh

@ -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)

2
packages/texlive/texlive-langkorean.subpackage.sh

@ -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)

Loading…
Cancel
Save