diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-07-29 14:27:05 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-31 12:22:10 +0100 |
commit | 3309cf42d314f0a26079a11836c6b9b9bb5f253e (patch) | |
tree | cda5643afec3348304549c51c81f4debf84ec490 | |
parent | ad63b9b11b4c42414ff2c180dd03c1a7283321ec (diff) | |
download | poky-3309cf42d314f0a26079a11836c6b9b9bb5f253e.tar.gz |
package_rpm.bbclass: Accomodate dash when using arrays
we were assigning local variable to an array coming through
positional arguments. local is a non posix contruct thats
also supported by dash luckily but operates differently in this
case it exapnds the array before assignment. so
local pkgs="$@"
turns into pkgs=locale-base-en-us locale-base-en-gb
ant we see errors
run.do_rootfs.25593: 932: local: locale-base-en-gb: bad variable name
So lets not use defining and assigning local in one go
first define a local and then the assignment
(From OE-Core rev: 4029ce1a15e1dbd374444ee77ccf2a915e463b7b)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/package_rpm.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index b4bc52e69b..50e9b31517 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -200,7 +200,12 @@ rpm_update_pkg () { | |||
200 | process_pkg_list_rpm() { | 200 | process_pkg_list_rpm() { |
201 | local insttype=$1 | 201 | local insttype=$1 |
202 | shift | 202 | shift |
203 | local pkgs="$@" | 203 | # $@ is special POSIX linear array can not be assigned |
204 | # to a local variable directly in dash since its separated by | ||
205 | # space and dash expands it before assignment | ||
206 | # and local x=1 2 3 and not x="1 2 3" | ||
207 | local pkgs | ||
208 | pkgs="$@" | ||
204 | local confbase=${INSTALL_CONFBASE_RPM} | 209 | local confbase=${INSTALL_CONFBASE_RPM} |
205 | 210 | ||
206 | echo -n > ${target_rootfs}/install/base_archs.pkglist | 211 | echo -n > ${target_rootfs}/install/base_archs.pkglist |