From b72e5fd82f71d83f7cba6d4047818b7eac0336d0 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 7 Feb 2019 09:30:12 +0100 Subject: [PATCH] Fix update-alternatives macro expansion in flatpak module builds Avoid using %{_sbindir}/update-alternatives in requires and scriptlets as it expands to /app/sbin/update-alternatives when building flatpak modules and not to /usr/sbin where the binary is actually installed in. --- wxGTK3.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 4c91e92..550b052 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -87,8 +87,8 @@ ranging from networking to HTML display and image manipulation. %package -n %{wxbasename}-devel Summary: Development files for the wxBase3 library Requires: %{wxbasename}%{?_isa} = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives -Requires(postun): %{_sbindir}/update-alternatives +Requires(post): /usr/sbin/update-alternatives +Requires(postun): /usr/sbin/update-alternatives %description -n %{wxbasename}-devel This package include files needed to link with the wxBase3 library. @@ -357,15 +357,15 @@ popd if [ -f %{_bindir}/wx-config ] && [ ! -h %{_bindir}/wx-config ] ; then rm %{_bindir}/wx-config fi -%{_sbindir}/update-alternatives --install %{_bindir}/wx-config \ +/usr/sbin/update-alternatives --install %{_bindir}/wx-config \ wx-config %{_libexecdir}/%{name}/wx-config 3 -%{_sbindir}/update-alternatives --install %{_bindir}/wxrc \ +/usr/sbin/update-alternatives --install %{_bindir}/wxrc \ wxrc %{_libexecdir}/%{name}/wxrc 3 %postun -n %{wxbasename}-devel if [ $1 -eq 0 ] ; then - %{_sbindir}/update-alternatives --remove wx-config %{_libexecdir}/%{name}/wx-config - %{_sbindir}/update-alternatives --remove wxrc %{_libexecdir}/%{name}/wxrc + /usr/sbin/update-alternatives --remove wx-config %{_libexecdir}/%{name}/wx-config + /usr/sbin/update-alternatives --remove wxrc %{_libexecdir}/%{name}/wxrc fi %files