Languishing GPSD Update

Fred Wright fw at fwright.net
Fri Apr 1 14:16:03 PDT 2016


On Mon, 22 Feb 2016, Mojca Miklavec wrote:

> On 22 February 2016 at 01:56, Fred Wright wrote:
> > On Wed, 10 Feb 2016, Fred Wright wrote:
> >> On Sat, 6 Feb 2016, Fred Wright wrote:
> >>
> >> > It's been 3 weeks since I posted patches to update gpsd to 3.16 (ticket
> >> > #50288), fixing #47739 in the process.
> >
> > Now 5 weeks.  Although this got some attention, it's still in limbo.
>
> I would love to see the port upgraded as well, but given that it's a
> maintained port I still hope that its maintainer will respond and do
> the commit. (I don't dare to touch it unless Ryan asks for help.)

Actually, Ryan already mentioned that he tried to update it once, but
ran afoul of the dbus linking error, which is one of the many things I
fixed.

It is, after all, listed as "openmaintainer".

> The line "#!/usr/bin/env python" in "/opt/local/bin/xgps" for example
> is something that should also be fixed.
>
> On my machine I get:
>
> > xgps
>   File "/opt/local/bin/xgps", line 644
>     Base.gpsfields = map(lambda ((label, hook), widget): (hook, widget),
>                                 ^
> SyntaxError: invalid syntax
>
> (Because I use "port select python python3.5" and I don't want to
> change that for a number of reasons. But I never used xgps so far, so
> I never noticed it.)

Actually, that specific problem is fixed by the switch to 'python2' in the
shebang lines in 3.16, but then you need to have a 'python2'.

Using a problem which is *fixed* (to some extent, anyway) by a proposed
patch as reason not to accept the patch is rather disingenuous. :-)

> Btw, the port misses some other dependencies like py27-pygtk:
>
> > python2.7 /opt/local/bin/xgps
> Traceback (most recent call last):
>   File "/opt/local/bin/xgps", line 26, in <module>
>     import gtk
> ImportError: No module named gtk

Again, that's something I already fixed (as mentioned in the ticket).

> Replacing the shebang with "#!${prefix}/bin/python2.7" doesn't really
> reduce maintainability of the port. The divergence from upstream is
> necessary in this case to make sure that the port works for everyone.

It reduces maintainability by requiring the port to know what files need
to be patched.  And you can't use wildcards because the files in question
don't have .py extensions.

Although I'm coming around to seeing the versioned shebang lines as a
necessary evil (which could actually be made unnecssary, but it would be
quite a bit of work), I think this should be handled (optionally) by
GPSD's own build script.  I'm working on convincing Eric that this is a
useful feature.

*But*, nobody complained about the generic shebang lines in any of the
previous 47 versions of this port.  And probably the only reason anyone
noticed this time is that I included the warnings for people that don't
have a 'python2' command established (which I notice is now being
suggested by the port notes for Python).

Aside from getting it off my plate, I have no personal need to get this
patch accepted at all, since:

1) My private copy of the port works just fine.

2) The upstream GPSD from HEAD now builds just fine on OSX "out of the
box"

3) Because of the development and testing I'm doing on the upstream GPSD,
I need to have the MacPorts version not installed most of the time,
anyway.

So the only reason for me to push this patch is for others.  If nobody
wants a newer version enough to *maybe* need a 'python2' command to run
some of the programs without an explicit Python invocation, then so be it.

BTW, the upstream GPSD is approaching full Python 3 compatibility, but in
order to test with as many versions as I wanted, I not only needed to
expand the Python version lists of several ports, but also had to make
tweaked versions for 4 out of the 6 relevant Python ports in order to
undisable select.poll.

Fred Wright


More information about the macports-dev mailing list