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

x2go pushed a commit to branch master
in repository x2goserver.

commit 37890c4088837d4fc77d5077d4bd85acda768db0
Author: Mike Gabriel <[email protected]>
Date:   Thu Jul 26 14:35:25 2018 +0200

    debian/x2goserver.postinst: when testing for existence of 
/etc/x2go/applications, also consider it being a dangling symlink (dangling 
symlinks are not caught by 'test -e', but need a 'test -L'. Thanks to Andreas 
Beckmann for helping with this. (Closes: DBTS#904515).
    
    Backported from a Debian patch.
---
 debian/changelog           | 6 ++++++
 debian/x2goserver.postinst | 7 ++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 4d694ce..d9e9ceb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,12 @@ x2goserver (4.1.0.1-0x2go1) UNRELEASED; urgency=medium
     + Drop inert file (due to wrong file suffix): debian/x2goserver.link.
     + Drop x2goserver-xsession.links. Symlinking provided by main Makefile's
       install target.
+  * debian/x2goserver.postinst:
+    + When testing for existence of /etc/x2go/applications, also consider it
+      being a dangling symlink (dangling symlinks are not caught by 'test -e',
+      but need a 'test -L'. Thanks to Andreas Beckmann for helping with this.
+      (Closes: DBTS#904515).
+      Backported from a Debian patch.
 
   [ Mihai Moldovan ]
   * New upstream version (4.1.0.1):
diff --git a/debian/x2goserver.postinst b/debian/x2goserver.postinst
index 7c73421..dbaf195 100755
--- a/debian/x2goserver.postinst
+++ b/debian/x2goserver.postinst
@@ -51,7 +51,12 @@ case "${1}" in
                fi
 
                # create /etc/x2go/applications symlink if not already there 
(as link or as dir)
-               if ! test -e '/etc/x2go/applications'; then
+               # N.B.: dangling symlinks will lead to test -e FAILING, because 
the symlink is dereferenced.
+               # This means that without the explicit symlink check (which 
doesn't dereference the last
+               # element), the ln call would be executed and fail, since the 
file/symlink already exists,
+               # leading to this scriptlet failing and hence leading to the 
installation failing.
+               #   v file doesn't exist (dereferenced!)      v is not a symlink
+               if ! test -e '/etc/x2go/applications' && ! test -L 
'/etc/x2go/applications'; then
                        ln -s '/usr/share/applications' '/etc/x2go/applications'
                fi
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/x2goserver.git
_______________________________________________
x2go-commits mailing list
[email protected]
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to