diff --git a/baselibs.conf b/baselibs.conf index c81504c..8a4cdde 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,15 +1,6 @@ gdk-pixbuf-query-loaders +/usr/bin/gdk-pixbuf-query-loaders(-64)? - post "%if "%_lib" == "lib64"" - post "if [ $1 == 1 ]; then test -d %{_libdir}/gdk-pixbuf-2.0/2.10.0; if test $? -eq 0; then %{_bindir}/gdk-pixbuf-query-loaders-64 --update-cache; fi; fi" - post "%else" - post "if [ $1 == 1 ]; then test -d %{_libdir}/gdk-pixbuf-2.0/2.10.0; if test $? -eq 0; then %{_bindir}/gdk-pixbuf-query-loaders --update-cache; fi; fi" - post "%endif" + post "if [ $1 == 1 ]; then test -d %{_libdir}/gdk-pixbuf-2.0/2.10.0; if test $? -eq 0; then %{_bindir}/gdk-pixbuf-query-loaders --update-cache; fi; fi" libgdk_pixbuf-2_0-0 - requires "gdk-pixbuf-query-loaders-" provides "gdk-pixbuf- = " - post "%if "%_lib" == "lib64"" - post "if test -f %{_bindir}/gdk-pixbuf-query-loaders-64; then %{_bindir}/gdk-pixbuf-query-loaders-64 --update-cache; fi" - post "%else" - post "if test -f %{_bindir}/gdk-pixbuf-query-loaders; then %{_bindir}/gdk-pixbuf-query-loaders --update-cache; fi" - post "%endif" + post "if test -f %{_bindir}/gdk-pixbuf-query-loaders; then %{_bindir}/gdk-pixbuf-query-loaders --update-cache; fi" diff --git a/gdk-pixbuf.changes b/gdk-pixbuf.changes index 6e5511c..b03be68 100644 --- a/gdk-pixbuf.changes +++ b/gdk-pixbuf.changes @@ -1,24 +1,3 @@ -------------------------------------------------------------------- -Wed Oct 13 20:21:06 CEST 2010 - vuntz@opensuse.org - -- Put comments that are in the scriptlets area of the spec file in - "%if 0" statement: if we don't do that, they actually end up in - the scriplets and can even make them fail if the scriptlets were - just "-p /sbin/ldconfig". - -------------------------------------------------------------------- -Tue Oct 12 00:13:44 CEST 2010 - vuntz@opensuse.org - -- Remove gdk-pixbuf-query-loaders Requires(postun) in - libgdk_pixbuf-2_0-0: it's not needed. -- Add missing Requires for gdk-pixbuf-query-loaders to - libgdk_pixbuf-2_0-0 in baselibs.conf. -- Update baselibs.conf to remove assumption in the scriptlets of - the generated packages that they are 32bit packages. -- Use in baselibs.conf since we use full paths there, and - this is needed for x86 packages that put files in - /emul/ia32-linux. - ------------------------------------------------------------------- Tue Sep 21 23:24:22 CEST 2010 - vuntz@opensuse.org diff --git a/gdk-pixbuf.spec b/gdk-pixbuf.spec index cfc5f26..be4d6fe 100644 --- a/gdk-pixbuf.spec +++ b/gdk-pixbuf.spec @@ -16,8 +16,6 @@ # -# When updating the binary version, do not forget to also update baselibs.conf -%define gdk_pixbuf_binary_version 2.10.0 Name: gdk-pixbuf Version: 2.22.0 @@ -49,6 +47,7 @@ Group: System/Libraries # Provide %{name} to make the lang package installable Provides: %{name} = %{version} Requires(post): gdk-pixbuf-query-loaders +Requires(postun): gdk-pixbuf-query-loaders Recommends: %{name}-lang = %{version} Conflicts: gtk2 < 2.21.3 @@ -101,7 +100,7 @@ cp -a %{S:2} . %makeinstall find %{buildroot}%{_libdir} -name '*.la' -delete -print %find_lang %{name} -touch %{buildroot}%{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders.cache +touch %{buildroot}%{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache %if "%_lib" == "lib64" mv %{buildroot}%{_bindir}/gdk-pixbuf-query-loaders %{buildroot}%{_bindir}/gdk-pixbuf-query-loaders-64 mv %{buildroot}%{_mandir}/man1/gdk-pixbuf-query-loaders.1 %{buildroot}%{_mandir}/man1/gdk-pixbuf-query-loaders-64.1 @@ -110,49 +109,41 @@ touch %{buildroot}%{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders mkdir -p %{buildroot}%{_sysconfdir}/rpm cp %{S:1} %{buildroot}%{_sysconfdir}/rpm -########################################################################### -# Note: when updating scriptlets, don't forget to also update baselibs.conf -########################################################################### - # Convenient %define for the scriplets %if "%_lib" == "lib64" -%define _gdk_pixbuf_query_loaders %{_bindir}/gdk-pixbuf-query-loaders-64 +%define GDK_PIXBUF_QUERY_LOADERS %{_bindir}/gdk-pixbuf-query-loaders-64 %else -%define _gdk_pixbuf_query_loaders %{_bindir}/gdk-pixbuf-query-loaders +%define GDK_PIXBUF_QUERY_LOADERS %{_bindir}/gdk-pixbuf-query-loaders %endif -%define _gdk_pixbuf_query_loaders_update_cache %{_gdk_pixbuf_query_loaders} --update-cache + +# In case libgdk_pixbuf-2_0-0 gets installed before +# gdk-pixbuf-query-loaders, we don't want to fail. So we make the +# call to gdk-pixbuf-query-loaders dependent on the existence of +# the binary. This is why we also have a %post for +# gdk-pixbuf-query-loaders. %post -n libgdk_pixbuf-2_0-0 /sbin/ldconfig -%if 0 -# In case libgdk_pixbuf-2_0-0 gets installed before gdk-pixbuf-query-loaders, -# we don't want to fail. So we make the call to gdk-pixbuf-query-loaders -# dependent on the existence of the binary. This is why we also have a %post -# for gdk-pixbuf-query-loaders. -%endif -if test -f %{_gdk_pixbuf_query_loaders}; then - %{_gdk_pixbuf_query_loaders_update_cache} +if test -f %{GDK_PIXBUF_QUERY_LOADERS}; then + %{GDK_PIXBUF_QUERY_LOADERS} --update-cache fi +# If we install gdk-pixbuf-query-loaders for the first time, +# then we should run it in case libgdk_pixbuf-2_0-0 was installed +# first (ie, if %{_libdir}/gdk-pixbuf-2.0/2.10.0 already exists) which means +# gdk-pixbuf-query-loaders couldn't run there. + %post query-loaders -%if 0 -# If we install gdk-pixbuf-query-loaders for the first time, then we should run -# it in case libgdk_pixbuf-2_0-0 was installed first (ie, if -# %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version} already exists) which -# means gdk-pixbuf-query-loaders couldn't run there. -%endif if [ $1 == 1 ]; then - test -d %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version} + test -d %{_libdir}/gdk-pixbuf-2.0/2.10.0 if test $? -eq 0; then - %{_gdk_pixbuf_query_loaders_update_cache} + %{GDK_PIXBUF_QUERY_LOADERS} --update-cache fi fi -%if 0 # No need to call gdk-pixbuf-query-loaders in postun: # - if it's an upgrade, it will have been called in post # - if it's an uninstall, we don't care about this anymore -%endif %postun -n libgdk_pixbuf-2_0-0 -p /sbin/ldconfig @@ -165,10 +156,10 @@ fi %{_libdir}/libgdk_pixbuf-2.0.so.0* %{_libdir}/libgdk_pixbuf_xlib-2.0.so.0* %dir %{_libdir}/gdk-pixbuf-2.0 -%dir %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version} -%dir %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders -%{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders/*.so -%ghost %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders.cache +%dir %{_libdir}/gdk-pixbuf-2.0/2.10.0 +%dir %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders +%{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders/*.so +%ghost %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache %{_libdir}/girepository-1.0/GdkPixbuf-2.0.typelib %files query-loaders