gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ✘gpsinfo


From: Gary E. Miller
Subject: Re: ✘gpsinfo
Date: Mon, 15 Mar 2021 18:20:50 -0700

Yo Fred!

On Mon, 15 Mar 2021 18:05:33 -0700 (PDT)
Fred Wright <fw@fwright.net> wrote:

> On Sun, 14 Mar 2021, Gary E. Miller wrote:
> > On Mon, 15 Mar 2021 01:24:42 +0100
> > Bernd Zeimetz <bernd@bzed.de> wrote:  
> [...]
> >> do the same for python3 and check which of them is able to import
> >> the module.  
> >
> > Oh, yeah.  I forget how Debian does not conform to PEPs.  Good
> > catch.  
> 
> The only Python that matters is the one referenced in the shebang
> lines. Aside from error checking, that means something like this:
> 
>       $(head -1 $(which gpscat) | cut -b 3-) -V

gpsdebuginfo alreay does this:

    head -n 1 `which xgps`

Your command assumes that the shebang is present and working.  And hides
valuable debug info.  gpsdebuginfo is for when things are broken.

The current test also prints gpsd module version, which may differ
from the python client version.  Which your does not do.

And, just today on IRC, a user wanted both python and python3, so best to
keep the script inclusive of options.

> Also note that running "gpscat -V" is sufficient to check that
> imports work, including the packetizer.

Assuming gpscat is not broken.  People run the script when things are
broken.

> Anything related to Python needs to be optional, in case the install
> used "python=no".

No way to know if python=no.  Worse, this will usually be run when
gpsd installed from packages.  It fails nicely, so I'm not worried about
running when not needed.  The problem is not being run when it needs to.

I changed the test from xgps to gpscat, as gpscat may be installed,
when xgps is not.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpwfl2O4ysFQ.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]