From: Sangjung Woo Date: Tue, 6 Aug 2019 04:12:49 +0000 (+0900) Subject: [Spec] Fix the bug of post uninstall script. X-Git-Tag: accepted/tizen/unified/20190905.060558~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c28f0820a96c08032fb04ccf398725a8ffcd9e73;p=platform%2Fupstream%2Fnnstreamer.git [Spec] Fix the bug of post uninstall script. Post uninstall script with `-p` option invokes a single program directly instead of spawning shell script. Because of this reason, below error occurs when uninstalling package. This patch fixes that bug. /sbin/ldconfig: relative path `1' used to build cache warning: %postun(nnstreamer-0.2.1-6.4.i686) scriptlet failed, exit status 1 Signed-off-by: Sangjung Woo --- diff --git a/packaging/nnstreamer.spec b/packaging/nnstreamer.spec index ff414ba..de87acb 100644 --- a/packaging/nnstreamer.spec +++ b/packaging/nnstreamer.spec @@ -206,6 +206,15 @@ ninja -C build %{?_smp_mflags} %install DESTDIR=%{buildroot} ninja -C build %{?_smp_mflags} install +pushd %{buildroot}%{_libdir} +ln -sf %{gstlibdir}/libnnstreamer.so libnnstreamer.so +popd + +mkdir -p %{buildroot}%{python_sitelib} +pushd %{buildroot}%{python_sitelib} +ln -sf %{_prefix}/lib/nnstreamer/filters/nnstreamer_python2.so nnstreamer_python.so +popd + %if 0%{?testcoverage} ## # The included directories are: @@ -252,19 +261,9 @@ mkdir -p %{buildroot}%{_datadir}/nnstreamer/unittest/ cp -r result %{buildroot}%{_datadir}/nnstreamer/unittest/ %endif -%post -pushd %{_libdir} -ln -s %{gstlibdir}/libnnstreamer.so libnnstreamer.so -popd -/sbin/ldconfig - -%post -n nnstreamer-python2 -ln -s %{_prefix}/lib/nnstreamer/filters/nnstreamer_python2.so %{python_sitelib}/nnstreamer_python.so +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig -pushd %{_libdir} -rm libnnstreamer.so -popd %files %manifest nnstreamer.manifest @@ -272,6 +271,7 @@ popd %license LICENSE %{_prefix}/lib/nnstreamer/decoders/libnnstreamer_decoder_*.so %{gstlibdir}/*.so +%{_libdir}/libnnstreamer.so %{_sysconfdir}/nnstreamer.ini # for tensorflow @@ -292,6 +292,7 @@ popd %defattr(-,root,root,-) %{_prefix}/lib/nnstreamer/filters/libnnstreamer_filter_python2.so %{_prefix}/lib/nnstreamer/filters/nnstreamer_python2.so +%{python_sitelib}/nnstreamer_python.so %files devel %{_includedir}/nnstreamer/tensor_typedef.h