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 18477158041 for ; Tue, 2 Apr 2024 13:58:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 598B5E2A65; Tue, 2 Apr 2024 13:58:32 +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 41D4BE2A6F for ; Tue, 2 Apr 2024 13:58:32 +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 80FA43431C6 for ; Tue, 2 Apr 2024 13:58:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0F58BBEB for ; Tue, 2 Apr 2024 13:58:30 +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: <1712066268.0dc4e5e46353df7316b6ddf47f351a636423c620.flow@gentoo> Subject: [gentoo-commits] proj/tex-overlay:main commit in: eclass/ X-VCS-Repository: proj/tex-overlay X-VCS-Files: eclass/texlive-module.eclass X-VCS-Directories: eclass/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 0dc4e5e46353df7316b6ddf47f351a636423c620 X-VCS-Branch: main Date: Tue, 2 Apr 2024 13:58:30 +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: b8a2427f-f2ad-41f0-8660-048f49316902 X-Archives-Hash: 653821abbe9ec8b27fd7154747d9a951 commit: 0dc4e5e46353df7316b6ddf47f351a636423c620 Author: Florian Schmaus gentoo org> AuthorDate: Tue Apr 2 13:57:48 2024 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Tue Apr 2 13:57:48 2024 +0000 URL: https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=0dc4e5e4 texlive-module.eclass: improved texlive-common_append_to_src_uri Signed-off-by: Florian Schmaus gentoo.org> eclass/texlive-module.eclass | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass index 08dd7e4..1fb655b 100644 --- a/eclass/texlive-module.eclass +++ b/eclass/texlive-module.eclass @@ -425,11 +425,11 @@ texlive-module_src_install() { # Update the TexLive package database at /usr/share/tlpkg/texlive.tlpdb. texlive-module_update_tlpdb() { - [[ "${TL_PV}" -lt 2023 ]] && return + [[ ${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 + [[ -n ${REPLACING_VERSIONS} && ${EBUILD_PHASE} == postrm ]] && return local tlpkg="${EROOT}"/usr/share/tlpkg local tlpobj="${tlpkg}"/tlpobj @@ -441,23 +441,12 @@ texlive-module_update_tlpdb() { touch "${new_tlpdb}" || die - local f - local tlpobjs=() - for f in $(find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" | sort); do - tlpobjs+=( "${f}" ) + 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 [[ ${#tlpobjs[@]} -lt 128 ]]; then - continue - fi - - cat ${tlpobjs[@]} >> "${new_tlpdb}" || die - tlpobjs=() - done - if [[ ${#tlpobjs[@]} -gt 0 ]]; then - cat ${tlpobjs[@]} >> "${new_tlpdb}" || die - fi - - if [[ -f "${tlpdb}" ]]; then + if [[ -f ${tlpdb} ]]; then cmp -s "${new_tlpdb}" "${tlpdb}" local ret=$? case ${ret} in @@ -481,7 +470,7 @@ texlive-module_update_tlpdb() { mv "${new_tlpdb}" "${tlpdb}" eend $? "moving tlpdb into position failed (exit status: ${?})" || die - if [[ ! -s "${tlpdb}" ]]; then + if [[ ! -s ${tlpdb} ]]; then rm "${tlpdb}" || die fi }