From 42d272f6f01706e533704f31c005176ac58a6dbf Mon Sep 17 00:00:00 2001 From: Vyacheslav Barinov Date: Tue, 10 Feb 2015 10:07:48 +0300 Subject: Ignoring non-existent files during build Now the qemu-accel package can be used even if dependencies changed. Discovered during switching off msm.so plugin. Conflicts: packaging/qemu-accel-aarch64.spec packaging/qemu-accel-armv7l.spec packaging/qemu-accel.spec.in Change-Id: Iea4b9849a28ba2f3aed18d46e97a61819359d62d Signed-off-by: Vyacheslav Barinov --- packaging/qemu-accel-aarch64.spec | 5 +++-- packaging/qemu-accel-armv7l.spec | 3 ++- packaging/qemu-accel.spec.in | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index 6281f62..78a4dd9 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -84,7 +84,7 @@ This package is used in qemu-accel to accelerate python. set +x gcc_version=`gcc --version | sed -ne '1s/[^0-9]*\(\([0-9]\.\?\)*\).*/\1/p'` # just like it is determided in python.spec -python_version=`python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3` +python_version=`python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3` binaries="%{_libdir}/libnsl.so.1 %{_libdir}/libnss_compat.so.2" # loaded via dlopen by glibc %ifarch %ix86 @@ -140,7 +140,8 @@ echo "" for binary in $binaries do outfile=%{buildroot}/%{our_path}/$binary - [ -f $outfile ] && continue + [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && continue + [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && continue mkdir -p ${outfile%/*} cp -aL $binary $outfile objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \ diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index c00b5df..d0c07cd 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -140,7 +140,8 @@ echo "" for binary in $binaries do outfile=%{buildroot}/%{our_path}/$binary - [ -f $outfile ] && continue + [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && continue + [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && continue mkdir -p ${outfile%/*} cp -aL $binary $outfile objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \ diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in index bc7a7fb..63b6c1a 100644 --- a/packaging/qemu-accel.spec.in +++ b/packaging/qemu-accel.spec.in @@ -137,7 +137,8 @@ echo "" for binary in $binaries do outfile=%{buildroot}/%{our_path}/$binary - [ -f $outfile ] && continue + [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && continue + [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && continue mkdir -p ${outfile%/*} cp -aL $binary $outfile objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \ -- cgit v1.2.3