Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-java
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: Gentoo Java <gentoo-java@g.o>
From: Petteri R├Ąty <betelgeuse@g.o>
Subject: Detection of useless dependencies
Date: Sat, 19 Jul 2008 02:05:30 +0300
If you are using JAVA_PKG_STRICT and install dev-java/java-dep-check, 
you will start to see messages like the following:
 >>> Merging dev-java/xstream-1.2-r2 to /
  * Possibly unneeded dependencies found in package.env:
  *      commons-cli-1

This means that xstream is recording a dependency on commons-cli-1 to 
package.env but the class files installed by xstream don't reference any 
classes from commons-cli in the constant pool. For most packages this 
means that you just remove the usage from the ebuild but the tool will 
also give you false positives if the dependency is only needed at 
runtime and is loaded a provider framework for example. These false 
positives will eventually be hidden by mandating the use of 
java-pkg_register-dependency for these dependencies and then we can use 
the values given to that function to filter those out from the results 
of java-dep-check.

Regards,
Petteri
Index: java-pkg-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v
retrieving revision 1.28
diff -u -r1.28 java-pkg-2.eclass
--- java-pkg-2.eclass	7 Jul 2008 16:54:56 -0000	1.28
+++ java-pkg-2.eclass	18 Jul 2008 22:13:44 -0000
@@ -49,7 +49,7 @@
 	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 @@
 	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
 # ------------------------------------------------------------------------------
Attachment:
signature.asc (OpenPGP digital signature)
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
GCJ with IcedTea classpath?
Next by thread:
sun-jdk-1.7.0.0_alpha31
Previous by date:
Re: Re: Deprecating JDK 1.4
Next by date:
sun-jdk-1.7.0.0_alpha31


Updated Jun 17, 2009

Summary: Archive of the gentoo-java mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.