Using export VAR= instead of unset

Petteri Räty <[email protected]>
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
See https://bugs.gentoo.org/show_bug.cgi?id=189417#c11
I committed the attached patch that should make java-utils-2 again
behave in the same way as before the hooks were removed.

Regards,
Petteri
env-handling.patch (text/plain, 1.3 KB)
Index: java-utils-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
retrieving revision 1.96
diff -u -r1.96 java-utils-2.eclass
--- java-utils-2.eclass	25 Nov 2007 07:51:41 -0000	1.96
+++ java-utils-2.eclass	26 Nov 2007 20:36:46 -0000
@@ -2049,6 +2079,7 @@
 #
 # -----------------------------------------------------------------------------
 java-pkg_init() {
+	debug-print-function ${FUNCNAME} $*
 	unset JAVAC
 	unset JAVA_HOME
 
@@ -2066,7 +2097,7 @@
 	fi
 
 	if [[ -z ${accept} ]]; then
-		unset _JAVA_OPTIONS
+		export _JAVA_OPTIONS=
 		# phase hooks make this run many times without this
 		I_WANT_GLOBAL_JAVA_OPTIONS="true"
 	fi
@@ -2084,15 +2115,18 @@
 	# Do some QA checks
 	java-pkg_check-jikes
 
+	# Can't use unset here because Portage does not save the unset
+	# see https://bugs.gentoo.org/show_bug.cgi?id=189417#c11
+
 	# When users have crazy classpaths some packages can fail to compile.
 	# and everything should work with empty CLASSPATH.
 	# This also helps prevent unexpected dependencies on random things
 	# from the CLASSPATH.
-	unset CLASSPATH
+	export CLASSPATH=
 
 	# Unset external ANT_ stuff
-	unset ANT_TASKS
-	unset ANT_OPTS
+	export ANT_TASKS=
+	export ANT_OPTS=
 }
 
 # ------------------------------------------------------------------------------
signature.asc (application/pgp-signature, 252 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFHSy7LcxLzpIGCsLQRAiaBAJjWpoz1bLMU8+kMM/2Nmw20oEJ+AJ0fpiqh
ZPdWBNhP7QPK2z8fmJh6/g==
=JcWO
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.