From d954da1a5029841a54de8a2f81cba23b2c0c29c6 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 11 May 2010 08:19:44 +0000 Subject: [PATCH] Bug #318389: check for each examples directory before trying to use it. Also avoid QA warning on "use java" on ebuilds where java was not available. --- eclass/db.eclass | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/eclass/db.eclass b/eclass/db.eclass index 81d0d5670c15..b9cfd8c31640 100644 --- a/eclass/db.eclass +++ b/eclass/db.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.38 2010/05/11 08:00:20 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.39 2010/05/11 08:19:44 robbat2 Exp $ # This is a common location for functions used in the sys-libs/db ebuilds # # Bugs: pauldv@gentoo.org @@ -79,11 +79,16 @@ db_src_install_doc() { db_src_install_examples() { if use examples ; then local langs="c cxx stl" - use java && langs="${langs} java" + [[ "${IUSE/java}" != "${IUSE}" ]] \ + && use java \ + && langs="${langs} java" for i in $langs ; do destdir="/usr/share/doc/${PF}/" - dodir "${destdir}" - cp -ra "${S}/../examples_${i}/" "${D}${destdir}/" + src="${S}/../examples_${i}/" + if [ -f "${src}" ]; then + dodir "${destdir}" + cp -ra "${src}" "${D}${destdir}/" + fi done fi } -- 2.26.2