summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2008-07-18 22:53:20 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2008-07-18 22:53:20 +0000
commita8fef794839e7c92b1877e347834e704d80a436c (patch)
treef0d1ea58dff0d1a16c8012c17262ff99caa9be42 /eclass
parentVersion bump, remove old. (diff)
downloadhistorical-a8fef794839e7c92b1877e347834e704d80a436c.tar.gz
historical-a8fef794839e7c92b1877e347834e704d80a436c.tar.bz2
historical-a8fef794839e7c92b1877e347834e704d80a436c.zip
Add pkg_preinst for dependency checking
Diffstat (limited to 'eclass')
-rw-r--r--eclass/java-pkg-2.eclass21
1 files changed, 19 insertions, 2 deletions
diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass
index bf4f17f76a12..967936b5b17d 100644
--- a/eclass/java-pkg-2.eclass
+++ b/eclass/java-pkg-2.eclass
@@ -5,7 +5,7 @@
#
# Licensed under the GNU General Public License, v2
#
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.28 2008/07/07 16:54:56 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.29 2008/07/18 22:53:20 betelgeuse Exp $
inherit java-utils-2
@@ -49,7 +49,7 @@ if [[ ${CATEGORY} = dev-java && ${PN} = commons-* ]]; then
SRC_URI="mirror://apache/${PN/-///}/source/${P}-src.tar.gz"
fi
-EXPORT_FUNCTIONS pkg_setup src_compile
+EXPORT_FUNCTIONS pkg_setup src_compile pkg_preinst
# ------------------------------------------------------------------------------
# @eclass-pkg_setup
@@ -93,6 +93,23 @@ java-pkg-2_src_compile() {
fi
}
+
+java-pkg-2_pkg_preinst() {
+ if is-java-strict; then
+ if has_version dev-java/java-dep-check; then
+ local output=$(GENTOO_VM= java-dep-check --image "${D}" "${JAVA_PKG_ENV}")
+ if [[ ${output} ]]; then
+ ewarn "Possibly unneeded dependencies found in package.env:"
+ for dep in ${output}; do
+ ewarn "\t${dep}"
+ done
+ fi
+ else
+ eerror "Install dev-java/java-dep-check for dependency checking"
+ fi
+ fi
+}
+
# ------------------------------------------------------------------------------
# @eclass-end
# ------------------------------------------------------------------------------