summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2006-11-26 21:31:00 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2006-11-26 21:31:00 +0000
commit804400b039ee5545bce1bb0aabc9170da2e6a52b (patch)
tree7d88e0424fc97fca0673d2e78730b976d3f6ef7e /eclass/java-pkg.eclass
parentStable on ppc64 (diff)
downloadgentoo-2-804400b039ee5545bce1bb0aabc9170da2e6a52b.tar.gz
gentoo-2-804400b039ee5545bce1bb0aabc9170da2e6a52b.tar.bz2
gentoo-2-804400b039ee5545bce1bb0aabc9170da2e6a52b.zip
Added code to prevent quotes from ending to the CLASSPATH variable in package.env. First step in solving bug #155590.
Diffstat (limited to 'eclass/java-pkg.eclass')
-rw-r--r--eclass/java-pkg.eclass17
1 files changed, 14 insertions, 3 deletions
diff --git a/eclass/java-pkg.eclass b/eclass/java-pkg.eclass
index 6056ddd79da3..09c7f2debf59 100644
--- a/eclass/java-pkg.eclass
+++ b/eclass/java-pkg.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/java-pkg.eclass,v 1.45 2006/10/14 20:27:21 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg.eclass,v 1.46 2006/11/26 21:31:00 betelgeuse Exp $
inherit multilib
@@ -154,6 +154,7 @@ java-pkg_do_init_()
java-pkg_do_write_()
{
+ debug-print-function ${FUNCNAME} $*
# Create directory for package.env
dodir "${shareroot}"
@@ -161,6 +162,9 @@ java-pkg_do_write_()
echo "DESCRIPTION=${DESCRIPTION}" > "${package_env}"
echo "GENERATION=1" >> "${package_env}"
if [ -n "${cp_pkg}" ]; then
+ debug-print "cp_prepend: ${cp_prepend}"
+ debug-print "cp_pkg: ${cp_pkg}"
+ debug-print "cp_append: ${cp_append}"
echo "CLASSPATH=${cp_prepend}:${cp_pkg}:${cp_append}" >> "${package_env}"
fi
if [ -n "${lp_pkg}" ]; then
@@ -252,10 +256,17 @@ java-pkg_dojar()
do
if [ -f "${sharepath}/${i}/package.env" ] ; then
debug-print "${i} path: ${sharepath}/${i}"
+ # Before removing the quotes this caused
+ # https://bugs.gentoo.org/show_bug.cgi?id=155590
+ # There was also an extra quote in the else that could also be
+ # the cause.
if [ -z "${cp_append}" ] ; then
- cp_append=`grep "CLASSPATH=" "${sharepath}/${i}/package.env" | sed "s/CLASSPATH=//"`
+ cp_append=$(grep "CLASSPATH=" "${sharepath}/${i}/package.env" \
+ | sed -e "s/CLASSPATH=//" -e 's/"//')
else
- cp_append="${cp_append}:"`grep "CLASSPATH=" "${sharepath}/${i}/package.env" | sed "s/CLASSPATH=//"`
+ cp_append="${cp_append}:$(grep "CLASSPATH=" \
+ "${sharepath}/${i}/package.env" \
+ | sed -e "s/CLASSPATH=//" -e 's/"//')"
fi
else
debug-print "Error: Package ${i} not found."