buildpkg.packaging: simplify variable expansion for relnotes

Pick up only the variable names and not the values from the instrumented
build.sh to avoid double expansion of self-referencing assignments.
Instead we get the values from the running environment.
This commit is contained in:
Tom G. Christensen 2013-04-26 10:29:24 +02:00
parent 54976188a5
commit 4f1c76c750
2 changed files with 2 additions and 2 deletions

View File

@ -1111,7 +1111,7 @@ auto_rel()
[ -r "$metadir/sums" ] && temp_source_sha1sum="$(cat $metadir/sums | ${__awk} '{ printf "%s\\n",$0 }')"
source_sha1sum="${temp_source_sha1sum%\\*}"
# End of SHA1 sum computing
local temp_extracted_env="$(${__sed} -e 's/export /echo ENV /g' ${buildpkgbase}/${pkgdir}/build.sh >> /tmp/env.sh; bash /tmp/env.sh|${__grep} ^ENV|${__sed} -e 's/ENV //g'|${__awk} '{ printf "%s\\n",$0 }' && ${__rm} -f /tmp/env.sh)"
local temp_extracted_env="$(${__sed} -e 's/export /echo ENV /g' ${buildpkgbase}/${pkgdir}/build.sh | ${__bash} | ${__sed} -n 's/^ENV \([^=]*\)=.*/echo \1=$\1/p' | ${__bash} | ${__awk} '{ printf "%s\\n",$0 }')"
# Remove trailing \n
local extracted_env="${temp_extracted_env%\\*}"
if [ -r ${depends}_all ]; then

View File

@ -404,7 +404,7 @@ auto_rel()
source_sha1sum="${temp_source_sha1sum%\\*}"
### End of SHA1 sum computing
### Extract environtment variables
local temp_extracted_env="$(${__sed} -e 's/export /echo ENV /g' ${buildpkgbase}/${pkgdir}/build.sh >> /tmp/env.sh; bash /tmp/env.sh|${__grep} ^ENV|${__sed} -e 's/ENV //g'|${__awk} '{ printf "%s\\n",$0 }' && ${__rm} -f /tmp/env.sh)"
local temp_extracted_env="$(${__sed} -e 's/export /echo ENV /g' ${buildpkgbase}/${pkgdir}/build.sh | ${__bash} | ${__sed} -n 's/^ENV \([^=]*\)=.*/echo \1=$\1/p' | ${__bash} | ${__awk} '{ printf "%s\\n",$0 }')"
# Remove trailing \n
local extracted_env="${temp_extracted_env%\\*}"
###