summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlava Barinov <v.barinov@samsung.com>2017-03-20 09:53:59 +0300
committerSlava Barinov <v.barinov@samsung.com>2017-03-20 09:53:59 +0300
commita990b3e35f16ea6307678b6e2f1417a092b23799 (patch)
treeedfcd6efc4240c2978720db465d7210a1ee8deba
parent59a2a96e1389089216bcf930858a2cb7c8edfa4d (diff)
downloadqemu-accel-a990b3e35f16ea6307678b6e2f1417a092b23799.tar.gz
qemu-accel-a990b3e35f16ea6307678b6e2f1417a092b23799.tar.bz2
qemu-accel-a990b3e35f16ea6307678b6e2f1417a092b23799.zip
Fix bug in patch_binary function
The 'continue' won't work inside function, it must be replaced with 'return'. Change-Id: Ib83796bdbdf5bbab6b3745744a97e0d301ce1767 Signed-off-by: Slava Barinov <v.barinov@samsung.com>
-rw-r--r--packaging/qemu-accel-aarch64.spec8
-rw-r--r--packaging/qemu-accel-armv7l.spec8
-rw-r--r--packaging/qemu-accel.spec.in8
3 files changed, 12 insertions, 12 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec
index 461ca7a..8fe7345 100644
--- a/packaging/qemu-accel-aarch64.spec
+++ b/packaging/qemu-accel-aarch64.spec
@@ -165,11 +165,11 @@ function patch_binary {
local rtld=$2
# We don't need to accelerate shell scripts
local filetype=`file --brief $binary`
- [[ x"$filetype" == x"POSIX shell script"* ]] && continue
+ [[ x"$filetype" == x"POSIX shell script"* ]] && return
local outfile=%{buildroot}/%{our_path}/$binary
- [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && continue
- [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && continue
+ [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && return
+ [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
@@ -180,7 +180,7 @@ function patch_binary {
exit 1
fi
rm -f $outfile.data
- [ "$binary" == "$rtld" ] && continue
+ [ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{our_path}/%{_libdir}" $outfile
# not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec
index dd16df5..e8417b6 100644
--- a/packaging/qemu-accel-armv7l.spec
+++ b/packaging/qemu-accel-armv7l.spec
@@ -165,11 +165,11 @@ function patch_binary {
local rtld=$2
# We don't need to accelerate shell scripts
local filetype=`file --brief $binary`
- [[ x"$filetype" == x"POSIX shell script"* ]] && continue
+ [[ x"$filetype" == x"POSIX shell script"* ]] && return
local outfile=%{buildroot}/%{our_path}/$binary
- [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && continue
- [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && continue
+ [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && return
+ [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
@@ -180,7 +180,7 @@ function patch_binary {
exit 1
fi
rm -f $outfile.data
- [ "$binary" == "$rtld" ] && continue
+ [ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{our_path}/%{_libdir}" $outfile
# not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in
index bb78149..83c4a29 100644
--- a/packaging/qemu-accel.spec.in
+++ b/packaging/qemu-accel.spec.in
@@ -162,11 +162,11 @@ function patch_binary {
local rtld=$2
# We don't need to accelerate shell scripts
local filetype=`file --brief $binary`
- [[ x"$filetype" == x"POSIX shell script"* ]] && continue
+ [[ x"$filetype" == x"POSIX shell script"* ]] && return
local outfile=%{buildroot}/%{our_path}/$binary
- [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && continue
- [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && continue
+ [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && return
+ [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
@@ -177,7 +177,7 @@ function patch_binary {
exit 1
fi
rm -f $outfile.data
- [ "$binary" == "$rtld" ] && continue
+ [ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{our_path}/%{_libdir}" $outfile
# not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then