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 19:01:54 -0700

Yo Fred!

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

> >> 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.  
> 
> Which is why I said "aside from error checking".

Which misses the whole point of gpsdebuginfo.

> > The current test also prints gpsd module version, which may differ
> > from the python client version.  Which your does not do.  
> 
> My test was intended solely for the Python version test, and nothing
> else.

Thus my preference for the way it is now.  I'm sure we'll come up with
better ideas over time.

> > And, just today on IRC, a user wanted both python and python3, so
> > best to keep the script inclusive of options.  
> 
> When invoked normally, the programs will only use the one python
> version they're shebanged for.  Reporting the version of a Python
> they're *not* using is rather pointless.

Unless the program is broken.  Which wass today's case, and the
point of gpsdebuginfo.

> If you're really trying to report on all possible Pythons, regardless

Nope.  Just the obvious ones.  Gentoo can have a dozen at the same
time, but if they installed per the PEP, then gpsdebugino finds them.
No need to do more.  Until we do.


> >> 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.  
> 
> If gpscat is present and able to do -V, then the imports work.

Yes, but no one runs gpsdebuginfo when things are working.

> If
> it's present and not able to do -V, that almost certainly means that
> the imports don't work.  Hence, it's a straightforward import test.

I don't want a test, I want a diagnostic tool.  Not the same thing.

> >> 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.  
> 
> It can't directly know "python=no", but if everything else works and 
> Python-based programs are missing, then that's a pretty good bet, and 
> probably worth an appropriate message.

"if everying works".  Once aagin, this is for when things are NOT
working.

Of course, the true test will be our users and if gpsdebuginfo can
help us help them.

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: pgpifjuTIygwT.pgp
Description: OpenPGP digital signature


reply via email to

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