Patchwork [03/22] libzypp: Fix variable substitution problem in do_archgen step

login
register
mail settings
Submitter Saul Wold
Date Aug. 1, 2011, 7:35 a.m.
Message ID <1d453309b001b8381e6746a20eb69e2453bf33b0.1312182844.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/8945/
State New, archived
Headers show

Comments

Saul Wold - Aug. 1, 2011, 7:35 a.m.
From: Kumar Gala <galak@kernel.crashing.org>

The do_archgen step creates a script that utilizes the variable name
${ARCH}.  However, we also utilize and define ${ARCH} so instead of
having the following in the script:

	COMPAT_WITH="${ARCH},${COMPAT} $COMPAT_WITH"

We get something like:

	COMPAT_WITH="powerpc,${COMPAT} $COMPAT_WITH"

Just renaming the variable in the script to not conflict with ${ARCH}
fixes the issue.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 meta/recipes-extended/libzypp/libzypp_git.bb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
index 6555bd4..a9ed639 100644
--- a/meta/recipes-extended/libzypp/libzypp_git.bb
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -111,9 +111,9 @@  do_archgen () {
 				shift ; continue;;
 		esac
 		if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then
-		  ARCH="_$1"
+		  CARCH="_$1"
 		else
-		  ARCH="IdString(\"$1\")"
+		  CARCH="IdString(\"$1\")"
 		fi
 		shift
 		COMPAT=""
@@ -129,7 +129,7 @@  do_archgen () {
 				COMPAT="${arch_val},$COMPAT"
 			fi
 		done
-		COMPAT_WITH="${ARCH},${COMPAT} $COMPAT_WITH"
+		COMPAT_WITH="${CARCH},${COMPAT} $COMPAT_WITH"
 	done
 	for each_compat in ${COMPAT_WITH} ; do
 		echo "        defCompatibleWith( ${each_compat} );"		>> zypp/poky-arch.h