[X2Go-Commits] [x2goserver] 02/02: x2goserver.spec: RPM spec does not allow %elif or %elseif, which lead to all weird kinds of errors.

git-admin at x2go.org git-admin at x2go.org
Tue Mar 7 06:58:20 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch release/4.0.1.x
in repository x2goserver.

commit 9520baa93276dac26f416e93f154be7fb4f77169
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Tue Mar 7 06:57:48 2017 +0100

    x2goserver.spec: RPM spec does not allow %elif or %elseif, which lead to all weird kinds of errors.
    
    Split these up into nested conditions.
---
 debian/changelog |  2 ++
 x2goserver.spec  | 19 ++++++++++++-------
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1c1ca5d..c0ea0cd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -48,6 +48,8 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium
       comment regarding why desktop-file-utils is always needed.
     - Also add a trans(action)-requirement on shared-mime-info for older
       RHEL-based distros.
+    - RPM spec does not allow %elif or %elseif, which lead to all weird kinds
+      of errors. Split these up into nested conditions.
   * debian/po:
     - Tiny fixup on author name.
   * debian/control:
diff --git a/x2goserver.spec b/x2goserver.spec
index 55a289f..2ac2bf9 100644
--- a/x2goserver.spec
+++ b/x2goserver.spec
@@ -533,15 +533,17 @@ mkdir -p "/var/cache/gio-2.0"
 # 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 )
+%else
+%if 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} && 0%{?fedora} < 25
+%else
+%if 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.
-%else
-DELIBERATE_SYNTAX_ERROR_FOR_SUSE_TESTING
+%endif
+%endif
 %endif
 
 %postun fmbindings
@@ -551,16 +553,19 @@ if [ $1 -eq 0 ] ; then
 
         %mime_database_postun
         %desktop_database_postun
-%elif 0%{?suse_version} || ( 0%{?fedora} && 0%{?fedora} < 24 ) || ( 0%{?rhel} && 0%{?rhel} < 8 )
+%else
+%if 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} && 0%{?fedora} < 25
+%else
+%if 0%{?fedora} && 0%{?fedora} < 25
         /usr/bin/update-desktop-database &1>/dev/null 2>/dev/null || :
         # Check the post scriptlet for more information.
 %else
         # Need to have at least one command, do nothing.
         :
-        DELIBERATE_SYNTAX_ERROR_FOR_SUSE_TESTING_2
+%endif
+%endif
 %endif
 fi
 

--
Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list