Update (or create) the tlpdb based on the contents of
/usr/share/tlpkg/tlpobj.
Closes:
https://bugs.gentoo.org/928162
Signed-off-by: Florian Schmaus <
[email protected]>
---
eclass/texlive-module.eclass | 57 ++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index d19e02f02647..15346a3535eb 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -420,6 +420,61 @@ texlive-module_src_install() {
texlive-common_handle_config_files
}
+# @FUNCTION: texlive-module_update_tlpdb
+# @DESCRIPTION:
+# Update the TexLive package database at /usr/share/tlpkg/texlive.tlpdb.
+
+texlive-module_update_tlpdb() {
+ [[ ${TL_PV} -lt 2023 ]] && return
+
+ # If we are updating this package, then there is no need to update
+ # the tlpdb in postrm, as it will be again updated in postinst.
+ [[ -n ${REPLACING_VERSIONS} && ${EBUILD_PHASE} == postrm ]] && return
+
+ local tlpkg="${EROOT}"/usr/share/tlpkg
+ local tlpobj="${tlpkg}"/tlpobj
+ local tlpdb="${tlpkg}"/texlive.tlpdb
+
+ ebegin "Regenerating TexLive package database (${tlpdb}, ${EBUILD_PHASE})"
+