--- eclass/autotools-utils.eclass | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass index 84f6cb6..48b39cb 100644 --- a/eclass/autotools-utils.eclass +++ b/eclass/autotools-utils.eclass @@ -162,18 +162,20 @@ remove_libtool_files() { local archivefile=${f/%.la/.a} [[ "${f}" != "${archivefile}" ]] || die 'regex sanity check failed' - # Keep .la files when: - # - they have shouldnotlink=yes - likely plugins, - # - respective static archive exists. - if [[ ${removing_all} || ( -z ${shouldnotlink} && ! -f ${archivefile} ) ]]; then - einfo "Removing unnecessary ${f#${D%/}}" - rm -f "${f}" || die - fi - # Remove static libs we're not supposed to link against if [[ ${shouldnotlink} ]]; then einfo "Removing unnecessary ${archivefile#${D%/}}" rm -f "${archivefile}" || die + # We're never going to remove the .la file. + [[ ${removing_all} ]] || continue + fi + + # Keep .la files when: + # - they have shouldnotlink=yes - likely plugins (handled above), + # - respective static archive exists. + if [[ ${removing_all} || ! -f ${archivefile} ]]; then + einfo "Removing unnecessary ${f#${D%/}}" + rm -f "${f}" || die fi done } -- 1.7.6.1