From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4B0B2158041 for ; Thu, 4 Apr 2024 08:39:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 918F6E2AA0; Thu, 4 Apr 2024 08:39:42 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 75F7AE2AA0 for ; Thu, 4 Apr 2024 08:39:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 934823430B8 for ; Thu, 4 Apr 2024 08:39:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 069BD166B for ; Thu, 4 Apr 2024 08:39:40 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1712219962.1f7c05bcf94ecaec88e1bcccea022bd2e15106c9.flow@gentoo> Subject: [gentoo-commits] proj/tex-overlay:main commit in: eclass/ X-VCS-Repository: proj/tex-overlay X-VCS-Files: eclass/texlive-common.eclass eclass/texlive-module.eclass X-VCS-Directories: eclass/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 1f7c05bcf94ecaec88e1bcccea022bd2e15106c9 X-VCS-Branch: main Date: Thu, 4 Apr 2024 08:39:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e6960402-7939-4723-90c7-9e01724524ff X-Archives-Hash: 54e2776cb383b7bf8280d786ee5e0eac commit: 1f7c05bcf94ecaec88e1bcccea022bd2e15106c9 Author: Florian Schmaus gentoo org> AuthorDate: Thu Apr 4 08:39:22 2024 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Thu Apr 4 08:39:22 2024 +0000 URL: https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=1f7c05bc eclass: sync eclasses with ::gentoo Signed-off-by: Florian Schmaus gentoo.org> eclass/texlive-common.eclass | 57 +++++++++++++++++++++++++++++++++++++++++- eclass/texlive-module.eclass | 59 ++------------------------------------------ 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass index 1e5c8a5..66d3999 100644 --- a/eclass/texlive-common.eclass +++ b/eclass/texlive-common.eclass @@ -179,7 +179,8 @@ etexmf-update() { if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]] ; then "${EPREFIX}"/usr/sbin/texmf-update local res="${?}" - if [[ "${res}" -ne 0 ]] && ver_test -ge 2023; then + if [[ "${res}" -ne 0 ]] && + { [[ ${CATEGORY} != dev-texlive ]] || ver_test -ge 2023; } then die -n "texmf-update returned non-zero exit status ${res}" fi else @@ -248,4 +249,58 @@ texlive-common_append_to_src_uri() { fi } +# @FUNCTION: texlive-common_update_tlpdb +# @DESCRIPTION: +# Update the TexLive package database at /usr/share/tlpkg/texlive.tlpdb. +texlive-common_update_tlpdb() { + [[ -v TL_PV && ${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. + [[ ${EBUILD_PHASE} == postrm && -n ${REPLACED_BY_VERSION} ]] && return + + local tlpkg="${EROOT}"/usr/share/tlpkg + local tlpobj="${tlpkg}"/tlpobj + local tlpdb="${tlpkg}"/texlive.tlpdb + + ebegin "Regenerating TexLive package database" + + local new_tlpdb="${T}"/texlive.tlpdb + + touch "${new_tlpdb}" || die + + find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" -print0 | + sort -z | + xargs -0 --no-run-if-empty cat >> "${new_tlpdb}" + assert "generating tlpdb failed" + + if [[ -f ${tlpdb} ]]; then + cmp -s "${new_tlpdb}" "${tlpdb}" + local ret=$? + case ${ret} in + # content equal + 0) + # Nothing to do, return. + eend 0 + return + ;; + # content differs + 1) + ;; + # cmp failed with an error + *) + eend ${ret} "comparing new and existing tlpdb failed (exit status: ${ret})" + die + ;; + esac + fi + + mv "${new_tlpdb}" "${tlpdb}" + eend $? "moving tlpdb into position failed (exit status: ${?})" || die + + if [[ ! -s ${tlpdb} ]]; then + rm "${tlpdb}" || die + fi +} + fi diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass index bfe5e12..401b75b 100644 --- a/eclass/texlive-module.eclass +++ b/eclass/texlive-module.eclass @@ -420,61 +420,6 @@ 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. - [[ ${EBUILD_PHASE} == postrm && -n ${REPLACED_BY_VERSION} ]] && return - - local tlpkg="${EROOT}"/usr/share/tlpkg - local tlpobj="${tlpkg}"/tlpobj - local tlpdb="${tlpkg}"/texlive.tlpdb - - ebegin "Regenerating TexLive package database" - - local new_tlpdb="${T}"/texlive.tlpdb - - touch "${new_tlpdb}" || die - - find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" -print0 | - sort -z | - xargs -0 --no-run-if-empty cat >> "${new_tlpdb}" - assert "generating tlpdb failed" - - if [[ -f ${tlpdb} ]]; then - cmp -s "${new_tlpdb}" "${tlpdb}" - local ret=$? - case ${ret} in - # content equal - 0) - # Nothing to do, return. - eend 0 - return - ;; - # content differs - 1) - ;; - # cmp failed with an error - *) - eend ${ret} "comparing new and existing tlpdb failed (exit status: ${ret})" - die - ;; - esac - fi - - mv "${new_tlpdb}" "${tlpdb}" - eend $? "moving tlpdb into position failed (exit status: ${?})" || die - - if [[ ! -s ${tlpdb} ]]; then - rm "${tlpdb}" || die - fi -} - # @FUNCTION: texlive-module_pkg_postinst # @DESCRIPTION: # exported function: @@ -483,7 +428,7 @@ texlive-module_update_tlpdb() { texlive-module_pkg_postinst() { etexmf-update - texlive-module_update_tlpdb + texlive-common_update_tlpdb [[ -n ${TL_MODULE_INFORMATION} ]] && elog "${TL_MODULE_INFORMATION}" } @@ -495,7 +440,7 @@ texlive-module_pkg_postinst() { texlive-module_pkg_postrm() { [[ -z ${REPLACED_BY_VERSION} ]] && etexmf-update - texlive-module_update_tlpdb + texlive-common_update_tlpdb } fi