Browse Source

* NOT RELEASED YET

* debian/patches:
  - Updating gpsfake-gpsd-path.dpatch to let gpsfake exit gracefully if
    gpsd is not found. Thanks again to Andreas Putzo.

git-svn-id: https://ssl.recluse.de/svn/debian/packages/gpsd/trunk@467 9c2cd6cd-4e54-406b-9ece-f07a8ab7d216
tags/debian/2.37-6
bzed 13 years ago
parent
commit
47c48b93c9
2 changed files with 29 additions and 4 deletions
  1. +9
    -0
      debian/changelog
  2. +20
    -4
      debian/patches/gpsfake-gpsd-path.dpatch

+ 9
- 0
debian/changelog View File

@@ -1,3 +1,12 @@
gpsd (2.35-3) UNRELEASED; urgency=low

* NOT RELEASED YET
* debian/patches:
- Updating gpsfake-gpsd-path.dpatch to let gpsfake exit gracefully if
gpsd is not found. Thanks again to Andreas Putzo.

-- Bernd Zeimetz <bzed@debian.org> Tue, 18 Dec 2007 22:29:37 +0100

gpsd (2.35-2) unstable; urgency=low

* debian/control:


+ 20
- 4
debian/patches/gpsfake-gpsd-path.dpatch View File

@@ -1,18 +1,34 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## gpsfake-gpsd-path.dpatch by Bernd Zeimetz <bzed@debian.org>
##
## DP: /usr/sbin is not int $PATH for normal users.
## DP: gpsfake doesn't die gracefully if gpsd can't be executed.
## DP: Patch from Andreas Putzo.

@DPATCH@
diff -urNad gpsd~/gpsfake.py gpsd/gpsfake.py
--- gpsd~/gpsfake.py 2007-12-11 00:51:08.000000000 +0100
+++ gpsd/gpsfake.py 2007-12-18 16:28:16.000000000 +0100
@@ -326,7 +326,7 @@
+++ gpsd/gpsfake.py 2007-12-18 22:15:56.000000000 +0100
@@ -310,6 +310,8 @@
class DaemonError(exceptions.Exception):
def __init__(self, msg):
self.msg = msg
+ def __str__(self):
+ return repr(self.msg)
class DaemonInstance:
"Control a gpsd instance."
@@ -323,10 +325,13 @@
self.pidfile = "/tmp/gpsfake_pid-%s" % os.getpid()
def spawn(self, options, port, background=False, prefix=""):
"Spawn a daemon instance."
+ self.spawncmd = "/usr/sbin/gpsd"
+ if not os.path.isfile(self.spawncmd) or not os.access(self.spawncmd, os.X_OK):
+ raise DaemonError("Cannot execute %s" % self.spawncmd)
# The -b option to suppress hanging on probe returns is needed to cope
# with OpenBSD (and possibly other non-Linux systems) that don't support
# anything we can use to implement the FakeGPS.read() method
- self.spawncmd = "gpsd -b -N -S %s -F %s -P %s %s" % (port, self.control_socket, self.pidfile, options)
+ self.spawncmd = "/usr/sbin/gpsd -b -N -S %s -F %s -P %s %s" % (port, self.control_socket, self.pidfile, options)
+ self.spawncmd += " -b -N -S %s -F %s -P %s %s" % (port, self.control_socket, self.pidfile, options)
if prefix:
self.spawncmd = prefix + " " + self.spawncmd.strip()
if background:

Loading…
Cancel
Save