Accepting request 209259 from editors

- Change emacs wrapper script to use new dbus-run-session tool to
  avoid hanging emacs on terminal mode due I/O conflict on stdin
  of both emacs and dbus-launch session (bnc#853082)

OBS-URL: https://build.opensuse.org/request/show/209259
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/emacs?expand=0&rev=100
This commit is contained in:
Stephan Kulow
2013-12-03 15:11:07 +00:00
committed by Git OBS Bridge
2 changed files with 20 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Dec 3 11:00:44 UTC 2013 - werner@suse.de
- Change emacs wrapper script to use new dbus-run-session tool to
avoid hanging emacs on terminal mode due I/O conflict on stdin
of both emacs and dbus-launch session (bnc#853082)
-------------------------------------------------------------------
Fri Nov 22 20:38:08 UTC 2013 - schwab@linux-m68k.org

View File

@@ -43,10 +43,13 @@ else
echo "no emacs binary found"
exit 1
fi
dbusdaemon=$(type -p dbus-daemon 2>/dev/null)
dbuslaunch=$(type -p dbus-launch 2>/dev/null)
dbusession=$(type -p dbus-run-session 2>/dev/null)
#
# Now check for valid dbus, e.g. after su/sudo/slogin
#
if dbusdaemon=$(type -p dbus-daemon) && dbuslaunch=$(type -p dbus-launch) ; then
if test -n "$dbusdaemon" ; then
#
# Currently (2013/05/24) the option --autolaunch for scanning for an
# already existing session is an internal option of dbus-launch(1).
@@ -91,8 +94,15 @@ if dbusdaemon=$(type -p dbus-daemon) && dbuslaunch=$(type -p dbus-launch) ; then
unset mid guid suid dadd
# Oops ... no dbus-daemon then launch a new session
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
set -- $dbuslaunch --sh-syntax --close-stderr --exit-with-session ${1+"$@"}
arg0=$dbuslaunch
if test -z "$dbusession" -a -n "$dbuslaunch" ; then
set -- $dbuslaunch --sh-syntax --close-stderr --exit-with-session ${1+"$@"}
arg0=$dbuslaunch
elif test -n "$dbusession" ; then
set -- $dbusession -- ${1+"$@"}
arg0=$dbusession
else
arg0=emacs
fi
fi
unset dbuslaunch dbusdaemon
fi