commit:     ac957bc00b6bdc98a12d9164609b901ccb04e7b4
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  5 16:04:13 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Apr  5 16:04:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac957bc0

texlive-common_update_tlpdb: only run find if tlpobj dir exists

Closes: https://bugs.gentoo.org/928638
Closes: https://bugs.gentoo.org/928639
Closes: https://bugs.gentoo.org/928640
Closes: https://bugs.gentoo.org/928641
Closes: https://bugs.gentoo.org/928642
Closes: https://bugs.gentoo.org/928643
Closes: https://bugs.gentoo.org/928644
Closes: https://bugs.gentoo.org/928645
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 66d3999bd103..b32ea2af1121 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -269,10 +269,12 @@ texlive-common_update_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 [[ -d "${tlpobj}" ]]; then
+               find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" -print0 |
+                       sort -z |
+                       xargs -0 --no-run-if-empty cat >> "${new_tlpdb}"
+               assert "generating tlpdb failed"
+       fi
 
        if [[ -f ${tlpdb} ]]; then
                cmp -s "${new_tlpdb}" "${tlpdb}"

Reply via email to