diff options
author | Chan Lee <chan45.lee@samsung.com> | 2017-09-28 18:28:15 +0900 |
---|---|---|
committer | Dongkyun Son <dongkyun.s@samsung.com> | 2017-10-19 23:55:38 +0000 |
commit | 220f3abeda85ae02bda999564109fff4e48dd500 (patch) | |
tree | 49180309e30ffa3575a970b8ad5ef0dc0a186bc2 | |
parent | a0c8cd0c558dbd043222d2f287369193309ce4e6 (diff) | |
download | qemu-accel-220f3abeda85ae02bda999564109fff4e48dd500.tar.gz qemu-accel-220f3abeda85ae02bda999564109fff4e48dd500.tar.bz2 qemu-accel-220f3abeda85ae02bda999564109fff4e48dd500.zip |
packaging: fix 'No such file or directory' error when preinstall phasesubmit/tizen_base/20171024.003248accepted/tizen/base/20171027.152138
When the postinstall scriptlet runs in preinstall phase, creating symbolic link is
failed because gcc which provides liblto_plugin.so is not installed at this time.
[ 2s] [26/44] preinstalling qemu-accel-x86_64-armv7l...
...
[ 24s] running qemu-accel-x86_64-armv7l postinstall script
[ 24s] ln: creating symbolic link
`/usr/lib/gcc/armv7l-tizen-linux-gnueabi/6.2.1/liblto_plugin.so': No
such file or directory
Change-Id: If601da8dd8a8b6ae344a7d579e8821ccfa4918ce
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
-rw-r--r-- | packaging/qemu-accel-aarch64.spec | 6 | ||||
-rw-r--r-- | packaging/qemu-accel-armv7l.spec | 6 | ||||
-rw-r--r-- | packaging/qemu-accel.spec.in | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index 6dea06f..50b67a5 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -429,16 +429,16 @@ cat %{_sourcedir}/baselibs_prologue %{_sourcedir}/baselibs_body > %{_sourcedir}/ # Find gcc install directory gcc_install_dir=$(%{target_arch}-gcc -print-search-dirs | sed -ne '/install: /s/install: //p') # update baselibs.conf, overwrite LTO plugin -sed -i -e "s,#PLUGIN_POSTIN#,ln -sf %{our_path}${gcc_install_dir}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf +sed -i -e "s,#PLUGIN_POSTIN#,if [ -d %{libdir}/gcc/%{target_arch}/${gcc_version} ]; then\"\n post \" ln -sf %{our_path}${gcc_install_dir}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so\"\n post \"fi," %{_sourcedir}/baselibs.conf sed -i -e "s,#PLUGIN_POSTUN#,ln -sf liblto_plugin.so.0 ${gcc_install_dir}/liblto_plugin.so," %{_sourcedir}/baselibs.conf # Use /usr/lib for cross clang libdir on armv7l architecture %{?armv7l: -awk '/post "/ && !x {print $0; print " post \"echo export\\ CLANG_NO_LIBDIR_SUFFIX=1 >> /etc/profile\""; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf +awk '/post "/ && !x {print " post \"echo export\\ CLANG_NO_LIBDIR_SUFFIX=1 >> /etc/profile\""; print $0; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf } %{?multilib: -awk '/post "/ && !x {print $0; print " post \"echo '%{our_path}/lib' >> /etc/ld.so.conf\"\n"; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf +awk '/post "/ && !x {print " post \"echo '%{our_path}/lib' >> /etc/ld.so.conf\"\n"; print $0; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf } # Remove the ld-$VERSION.so to prevent name clashing with native ld.so diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index 9f5143a..bb0dafa 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -429,16 +429,16 @@ cat %{_sourcedir}/baselibs_prologue %{_sourcedir}/baselibs_body > %{_sourcedir}/ # Find gcc install directory gcc_install_dir=$(%{target_arch}-gcc -print-search-dirs | sed -ne '/install: /s/install: //p') # update baselibs.conf, overwrite LTO plugin -sed -i -e "s,#PLUGIN_POSTIN#,ln -sf %{our_path}${gcc_install_dir}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf +sed -i -e "s,#PLUGIN_POSTIN#,if [ -d %{libdir}/gcc/%{target_arch}/${gcc_version} ]; then\"\n post \" ln -sf %{our_path}${gcc_install_dir}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so\"\n post \"fi," %{_sourcedir}/baselibs.conf sed -i -e "s,#PLUGIN_POSTUN#,ln -sf liblto_plugin.so.0 ${gcc_install_dir}/liblto_plugin.so," %{_sourcedir}/baselibs.conf # Use /usr/lib for cross clang libdir on armv7l architecture %{?armv7l: -awk '/post "/ && !x {print $0; print " post \"echo export\\ CLANG_NO_LIBDIR_SUFFIX=1 >> /etc/profile\""; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf +awk '/post "/ && !x {print " post \"echo export\\ CLANG_NO_LIBDIR_SUFFIX=1 >> /etc/profile\""; print $0; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf } %{?multilib: -awk '/post "/ && !x {print $0; print " post \"echo '%{our_path}/lib' >> /etc/ld.so.conf\"\n"; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf +awk '/post "/ && !x {print " post \"echo '%{our_path}/lib' >> /etc/ld.so.conf\"\n"; print $0; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf } # Remove the ld-$VERSION.so to prevent name clashing with native ld.so diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in index b278e57..18646d8 100644 --- a/packaging/qemu-accel.spec.in +++ b/packaging/qemu-accel.spec.in @@ -426,16 +426,16 @@ cat %{_sourcedir}/baselibs_prologue %{_sourcedir}/baselibs_body > %{_sourcedir}/ # Find gcc install directory gcc_install_dir=$(%{target_arch}-gcc -print-search-dirs | sed -ne '/install: /s/install: //p') # update baselibs.conf, overwrite LTO plugin -sed -i -e "s,#PLUGIN_POSTIN#,ln -sf %{our_path}${gcc_install_dir}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf +sed -i -e "s,#PLUGIN_POSTIN#,if [ -d %{libdir}/gcc/%{target_arch}/${gcc_version} ]; then\"\n post \" ln -sf %{our_path}${gcc_install_dir}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so\"\n post \"fi," %{_sourcedir}/baselibs.conf sed -i -e "s,#PLUGIN_POSTUN#,ln -sf liblto_plugin.so.0 ${gcc_install_dir}/liblto_plugin.so," %{_sourcedir}/baselibs.conf # Use /usr/lib for cross clang libdir on armv7l architecture %{?armv7l: -awk '/post "/ && !x {print $0; print " post \"echo export\\ CLANG_NO_LIBDIR_SUFFIX=1 >> /etc/profile\""; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf +awk '/post "/ && !x {print " post \"echo export\\ CLANG_NO_LIBDIR_SUFFIX=1 >> /etc/profile\""; print $0; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf } %{?multilib: -awk '/post "/ && !x {print $0; print " post \"echo '%{our_path}/lib' >> /etc/ld.so.conf\"\n"; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf +awk '/post "/ && !x {print " post \"echo '%{our_path}/lib' >> /etc/ld.so.conf\"\n"; print $0; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf } # Remove the ld-$VERSION.so to prevent name clashing with native ld.so |