Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 808805 - sci-geosciences/gpsd-3.23: some Python files not installed, breaks xgps
Summary: sci-geosciences/gpsd-3.23: some Python files not installed, breaks xgps
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sci-geo Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-08-18 00:11 UTC by Maciej S. Szmigiero
Modified: 2021-08-18 19:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix (gpsd.patch,576 bytes, patch)
2021-08-18 00:11 UTC, Maciej S. Szmigiero
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej S. Szmigiero 2021-08-18 00:11:15 UTC
Since the upstream commit [1] gps/{__init__,gps}.py files are templatized, and so aren't present in the source tree.
Instead, they are generated in the build directory.
The ebuild, however, still runs setup.py script in the source directory, which fails to find and install these files (they aren't there since that commit).

The end result is that Python programs using these modules fail to start, including, for example, the bundled xgps utility:
> $ xgps
> Traceback (most recent call last):
>   File "/usr/bin/xgps", line 70, in <module>
>     if gps.__version__ != gps_version:
> AttributeError: module 'gps' has no attribute '__version__'

I've attached a simple patch to the ebuild that fixes the issue to me (both src_compile() and src_install() hunks seem to be required, otherwise the install script complains).

[1] https://gitlab.com/gpsd/gpsd/-/commit/1912054625c34a26b0c1b5fcf66d81f21358c20b
Comment 1 Maciej S. Szmigiero 2021-08-18 00:11:45 UTC
Created attachment 733643 [details, diff]
fix
Comment 2 Larry the Git Cow gentoo-dev 2021-08-18 19:39:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f268b9b67d24bcf1f6d6e376ffa9c5d30bc758f6

commit f268b9b67d24bcf1f6d6e376ffa9c5d30bc758f6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-18 18:39:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-18 19:22:50 +0000

    sci-geosciences/gpsd: fix Python modules
    
    Thanks-to: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
    Closes: https://bugs.gentoo.org/808805
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-geosciences/gpsd/{gpsd-3.23.ebuild => gpsd-3.23-r1.ebuild} | 6 +++++-
 sci-geosciences/gpsd/gpsd-9999.ebuild                          | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)