Skip to contentSkip to conversation

libzypp: Fix variable substitution problem in do_archgen step

PATCH Applied Kumar Gala 2 participants 2 messages Jul 28, 2011 – Aug 2, 2011

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 libzypp: Fix variable substitution problem in do_archgen step

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.

---
 meta/recipes-extended/libzypp/libzypp_git.bb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/libzypp/libzypp_git.bb +3 -3
index 6555bd4..a9ed639 100644
@@ -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
Signature · 1 line
1.7.3.4
Applied
#1 lore raw
Quoted 35 lines · Kumar Gala

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.

---
  meta/recipes-extended/libzypp/libzypp_git.bb |    6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/libzypp/libzypp_git.bb +2 -2
index 6555bd4..a9ed639 100644
@@ -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=""

meta/recipes-extended/libzypp/libzypp_git.bb do_archgen () { · line 135

Quoted 8 lines
meta/recipes-extended/libzypp/libzypp_git.bb +1 -1
@@ -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

Merged into OE-Core with a PR Bump

Thanks
Sau!