From: Andreas Sturmlechner Date: Wed, 2 Mar 2016 01:40:00 +0000 (+0100) Subject: kde5.eclass: Don't delete po/*.po files, only when not in LINGUAS X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=96f7e63620ae1c821f48759e3c6b253f01d9170f;p=gentoo.git kde5.eclass: Don't delete po/*.po files, only when not in LINGUAS --- diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index fd83a7109cb9..9356f3921f25 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -387,13 +387,13 @@ kde5_src_prepare() { if [[ -d po ]] ; then pushd po > /dev/null || die for lang in *; do - if ! has ${lang} ${LINGUAS} ; then - if [[ ${lang} != CMakeLists.txt ]] ; then - rm -rf ${lang} - fi + if [[ -d ${lang} ]] && ! has ${lang} ${LINGUAS} ; then + rm -r ${lang} || die if [[ -e CMakeLists.txt ]] ; then cmake_comment_add_subdirectory ${lang} fi + elif ! has ${lang/.po/} ${LINGUAS} ; then + rm ${lang} || die fi done popd > /dev/null || die