[X2Go-Commits] [x2goserver] 01/01: Revert "x2goserver.spec: also add fix to the perl-X2Go-Server-DB package." Revert "x2goserver.spec: create DB file via x2godbadmin createdb if the file does not exist OR (exists and has zero size). Fixes installation problems."

git-admin at x2go.org git-admin at x2go.org
Sat Feb 7 17:58:08 CET 2015


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

x2go pushed a commit to branch master
in repository x2goserver.

commit c359a2689ae4cc1c81c7014525d8c7f3ffdbe5e0
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Feb 7 14:40:13 2015 +0100

    Revert "x2goserver.spec: also add fix to the perl-X2Go-Server-DB package."
    Revert "x2goserver.spec: create DB file via x2godbadmin createdb if the file does not exist OR (exists and has zero size). Fixes installation problems."
    
    This reverts commits ed3c35a158a568b8ea1919c8726eee2eddad1d21 and
    e0d0b94aec8495f1e5ec44a5f147746592d22476.
    
    The old logic with test ! -s was fine. The last two commits merely add
    unnecessary verbosity and complexity.
---
 x2goserver.spec |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/x2goserver.spec b/x2goserver.spec
index 36bbede..b59304d 100644
--- a/x2goserver.spec
+++ b/x2goserver.spec
@@ -485,8 +485,7 @@ fi
 
 %post
 # Initialize the session database
-# ... only, if the DB does not exist OR (it exists AND the file is empty)
-if [ ! -e %{_localstatedir}/lib/x2go/x2go_sessions ] || ( [ -e %{_localstatedir}/lib/x2go/x2go_sessions ] && [ ! -s %{_localstatedir}/lib/x2go/x2go_sessions ] ); then
+if [ ! -s %{_localstatedir}/lib/x2go/x2go_sessions ]; then
   if [ -d %{_datadir}/doc/packages/perl-X2Go-Server-DB ]; then
     if grep -E "^backend=sqlite.*" /etc/x2go/x2gosql/sql 1>/dev/null 2>&1; then
       %{_sbindir}/x2godbadmin --createdb 1>/dev/null 2>&1 || :
@@ -540,8 +539,7 @@ fi
 
 %post -n perl-X2Go-Server-DB
 # Initialize the session database
-# ... only, if the DB does not exist OR (it exists AND the file is empty)
-if [ ! -e %{_localstatedir}/lib/x2go/x2go_sessions ] || ( [ -e %{_localstatedir}/lib/x2go/x2go_sessions ] && [ ! -s %{_localstatedir}/lib/x2go/x2go_sessions ] ); then
+if [ ! -s %{_localstatedir}/lib/x2go/x2go_sessions ]; then
   if [ -x %{_sbindir}/x2godbadmin ]; then
     if grep -E "^backend=sqlite.*" /etc/x2go/x2gosql/sql 1>/dev/null 2>&1; then
       %{_sbindir}/x2godbadmin --createdb 1>/dev/null 2>&1 || :

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


More information about the x2go-commits mailing list