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
commit714e94d40b5a68e90ef27c87b8bd266cb9df34b3 (patch)
tree9f3275dffdb0964c321059a70dd27773f6a7c537 /eclass
parentVersion bump, remove old. (diff)
downloadgentoo-2-714e94d40b5a68e90ef27c87b8bd266cb9df34b3.tar.gz
gentoo-2-714e94d40b5a68e90ef27c87b8bd266cb9df34b3.tar.bz2
gentoo-2-714e94d40b5a68e90ef27c87b8bd266cb9df34b3.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
# ------------------------------------------------------------------------------