[virt-tools-list] [PATCH virt-viewer v2] Fixes to spec file
Eduardo Lima (Etrunko)
etrunko at redhat.com
Thu Nov 23 13:52:26 UTC 2017
On 22/11/17 16:35, Christophe Fergeau wrote:
> On Wed, Nov 22, 2017 at 04:21:49PM -0200, Eduardo Lima (Etrunko) wrote:
>> - Use macros for paths instead of absolute paths.
>> - Fix scope of enable_autotools macro to avoid warning during build.
>> warning: Macro %enable_autotools defined but not used within scope
>>
>> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
>> ---
>> virt-viewer.spec.in | 23 ++++++++++++-----------
>> 1 file changed, 12 insertions(+), 11 deletions(-)
>>
>> diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in
>> index 54e2121..23fb0e7 100644
>> --- a/virt-viewer.spec.in
>> +++ b/virt-viewer.spec.in
>> @@ -3,7 +3,7 @@
>> # Default to skipping autoreconf. Distros can change just this one line
>> # (or provide a command-line override) if they backport any patches that
>> # touch configure.ac or Makefile.am.
>> -%{!?enable_autotools:%define enable_autotools 0}
>> +%{!?enable_autotools:%global enable_autotools 0}
>>
>> %define with_spice 0
>> %if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
>> @@ -82,7 +82,7 @@ autoreconf -if
>> %define govirt_arg --with-ovirt
>> %endif
>>
>> -%configure %{spice_arg} %{gtk_arg} %{govirt_arg} --with-buildid=%{release} --disable-update-mimedb
>> +%configure %{spice_arg} %{govirt_arg} --with-buildid=%{release} --disable-update-mimedb
>> %__make %{?_smp_mflags}
>>
>>
>> @@ -95,21 +95,22 @@ rm -rf $RPM_BUILD_ROOT
>> rm -rf $RPM_BUILD_ROOT
>>
>> %post
>> -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
>> -/bin/touch --no-create %{_datadir}/mime/packages &> /dev/null || :
>> -/usr/bin/update-desktop-database -q %{_datadir}/applications
>> +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
>> +touch --no-create %{_datadir}/mime/packages &> /dev/null || :
>> +%{_bindir}/update-desktop-database -q %{_datadir}/applications
>> +%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null
>
> Here you added a call to update-mime-database which was not there
> before?
> A bit odd that you remove a /bin/, /bin and /usr/bin are the same these
> days on at least fedora..
>
>>
>> %postun
>> if [ $1 -eq 0 ] ; then
>> - /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
>> - /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
>> - /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
>> + touch --no-create %{_datadir}/icons/hicolor &>/dev/null
>> + %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
>
> The call to update-mime-database is gone from here.
>
>> fi
>> -/usr/bin/update-desktop-database -q %{_datadir}/applications
>> +%{_bindir}/update-desktop-database -q %{_datadir}/applications
>> +%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null
>
> And moved out of the conditional? I believe it's done this way because
> on upgrades, the mime database is unchanged so we don't need to call
> update-mime-database, while on removal, we remove a mime type, so need
> to update the database.
>
All fixed, new version coming soon.
Thanks, Eduardo.
--
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20171123/68810def/attachment.sig>
More information about the virt-tools-list
mailing list