Browse Source

- Removing gpsfake-logfile-howto.dpatch and gpsfake-gpsd-path.dpatch -

integrated upstream. 

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

+ 3
- 2
debian/changelog View File

@@ -10,9 +10,10 @@ gpsd (2.36-1) unstable; urgency=low
* debian/libgps17.symbols:
- Removing the Debian revision from the minimal version number.
* debian/patches:
- Removing gpsfake-logfile-howto.dpatch - integrated upstream.
- Removing gpsfake-logfile-howto.dpatch and gpsfake-gpsd-path.dpatch -
integrated upstream.

-- Bernd Zeimetz <bzed@debian.org> Wed, 02 Jan 2008 10:35:02 +0100
-- Bernd Zeimetz <bzed@debian.org> Wed, 02 Jan 2008 10:41:10 +0100

gpsd (2.35-3) unstable; urgency=low



+ 0
- 1
debian/patches/00list View File

@@ -4,4 +4,3 @@ gpsd.hotplug_location.dpatch
gpxlogger-gps.h
INSTALL-description-fix
gpsd_dbus.h-buildfix
gpsfake-gpsd-path

+ 0
- 44
debian/patches/gpsfake-gpsd-path.dpatch View File

@@ -1,44 +0,0 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## gpsfake-gpsd-path.dpatch by Bernd Zeimetz <bzed@debian.org>
##
## DP: gpsfake doesn't die gracefully if gpsd can't be executed.
## DP: This patch fixes this by looking for gpsd in $PATH,
## DP: also adding the default install path of gpsd.
## DP: Based on a patch by 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-19 21:54:19.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,21 @@
self.pidfile = "/tmp/gpsfake_pid-%s" % os.getpid()
def spawn(self, options, port, background=False, prefix=""):
"Spawn a daemon instance."
+ self.spawncmd = None
+ if not '/usr/sbin' in os.environ['PATH']:
+ os.environ['PATH']=os.environ['PATH'] + ":/usr/sbin"
+ for path in os.environ['PATH'].split(':'):
+ _spawncmd = "%s/gpsd" % path
+ if os.path.isfile(_spawncmd) and os.access(_spawncmd, os.X_OK):
+ self.spawncmd = _spawncmd
+ break
+
+ if not self.spawncmd:
+ raise DaemonError("Cannot execute gpsd: executable not found.")
# 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 += " -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