summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-05-11 08:19:44 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-05-11 08:19:44 +0000
commita043ee8473c32a2ce65bd42d64dd33f543b0068c (patch)
tree3bf6c633c7179377b185ae8b1141980cf0f69230 /eclass
parentMaintenance. EAPI=2 (diff)
downloadgentoo-2-a043ee8473c32a2ce65bd42d64dd33f543b0068c.tar.gz
gentoo-2-a043ee8473c32a2ce65bd42d64dd33f543b0068c.tar.bz2
gentoo-2-a043ee8473c32a2ce65bd42d64dd33f543b0068c.zip
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.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/db.eclass13
1 files 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
}