This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 0f7f98ee307aeda8847576dc1af29e32dd1e9c3f Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Mar 7 04:31:24 2017 +0100 x2goserver.spec: make sure that we don't go into branches just because a macro is not defined on our platform. Cherry-picked from release/4.0.1.x branch. --- debian/changelog | 2 ++ x2goserver.spec | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 64cca4d..5c53968 100644 --- a/debian/changelog +++ b/debian/changelog @@ -272,6 +272,8 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium - Fix %{?fedora} macro usage. - Add the correct package name to the %posttrans scriptlet, we only need it for x2goserver-fmbindings. + - Make sure that we don't go into branches just because a macro is not + defined on our platform. * debian/po: - Tiny fixup on author name. * debian/control: diff --git a/x2goserver.spec b/x2goserver.spec index d01a36f..adcd85f 100644 --- a/x2goserver.spec +++ b/x2goserver.spec @@ -660,10 +660,15 @@ fi %if 0%{?suse_version} >= 1140 %mime_database_post %desktop_database_post -%elif 0%{?suse_version} || 0%{?fedora} < 24 || 0%{?rhel} < 8 +# We need the "weird" foo && foo < ... structure, because we only want to check the value +# *if* the macro is defined. Otherwise it will decay to 0 which means that the branch +# is always triggered - even on operating systems for which it should not be triggered. +# For example, this branch would be taken on Fedora >= 24 if using a plain "0%{?rhel} < 8" +# condition, since this ("0 < 8") would be true on a Fedora system. +%elif 0%{?suse_version} || { 0%{?fedora} && 0%{?fedora} < 24 } || { 0%{?rhel} && 0%{?rhel} < 8 } /usr/bin/update-mime-database %{_datadir}/mime &1>/dev/null 2>/dev/null || : /usr/bin/update-desktop-database &1>/dev/null 2>/dev/null || : -%elif 0%{?fedora} < 25 +%elif 0{?fedora} && 0%{?fedora} < 25 /usr/bin/update-desktop-database &1>/dev/null 2>/dev/null || : # FC 24 and higher have deprecated the mime database update scriptlet and handle changes transparently. # FC 25 and higher have deprecated the desktop database update scriptlet and handle changes transparently. @@ -674,17 +679,17 @@ if [ $1 -eq 0 ] ; then %if 0%{?suse_version} >= 1140 %mime_database_postun %desktop_database_postun -%elif 0%{?suse_version} || 0%{?fedora} < 24 || 0%{?rhel} < 8 +%elif 0%{?suse_version} || { 0%{?fedora} && 0%{?fedora} < 24 } || { 0%{?rhel} && 0%{?rhel} < 8 } /usr/bin/update-mime-database %{_datadir}/mime &1>/dev/null 2>/dev/null || : /usr/bin/update-desktop-database &1>/dev/null 2>/dev/null || : -%elif 0%{?fedora} < 25 +%elif 0{?fedora} && 0%{?fedora} < 25 /usr/bin/update-desktop-database &1>/dev/null 2>/dev/null || : # Check the post scriptlet for more information. %endif fi %posttrans fmbindings -%if 0%{?fedora} < 24 || 0%{?rhel} < 8 +%if { 0%?{?fedora} && 0%{?fedora} < 24 } || { 0%{?rhel} && 0%{?rhel} < 8 } /usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %endif -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git