`catkin` doesn't recognize `lint` verb

Bug #1892529 reported by John Morris
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ros-catkin-lint (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu Focal with these package versions installed:
python3-catkin-tools 0.5.0-1
python3-catkin-lint 1.6.6-1

The `catkin lint` command fails:

$ catkin lint
usage: catkin [-h] [-a] [--test-colors] [--version] [--force-color | --no-color]
              [build | clean | config | create | env | init | list | locate | profile] ...

Error: Unknown verb 'lint' provided.

The problem is that the `catkin-lint` package installs its Python package into the `/usr/share/catkin-lint/catkin_lint` directory, which is of course a non-standard location, outside of `sys.path`. Because of this, `pkg_resources` can't find the `/usr/share/catkin-lint/catkin_lint-1.6.6.egg-info/entry_points.txt` file, and `catkin` doesn't know about the `lint` verb.

The `catkin lint` command works fine when installed via `pip install catkin-lint`, which puts the Python package in the expected location.

Digging deeper, I see the `python3-catkin-lint` package is just a stub package that depends on `catkin-lint`, and customizes the `pybuild` configuration. I don't know how to fix that, exactly.

Tags: patch
Revision history for this message
John Morris (1pt1nq88tvxvjiijcixknc4iaqh3-na9c-8aho930n7szvk8tyqp2yd0cny5gr) wrote :

This patch reverses the dependencies, so `catkin-lint` pulls in `python3-catkin-lint`. The Python libs are in the `python3-catkin-lint` package now.

This fixes the problem for me, but I'm just a dabbler in Debian packaging, so I don't know the greater ramifications of esp. the dependency reversal.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-Reorganize-packages-to-install-Python-under-usr-lib-.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Timo Röhling (roehling) wrote :

Upstream author/Debian maintainer here.

I'm sorry that I had to break your workflow. The thing is, catkin_lint is actually a stand-alone tool with its own CLI binary, appropriately named catkin_lint. In the past, catkin_lint shipped for both Python 2 and Python 3, mostly to support non-standard ROS users who built against Python 3 before it became the norm. These days, there's no Python 2 any more, catkin_lint's Python code was never meant as public API anyway, and Debian policy strongly discourages shipping programs as libraries.

The entry point for catkin_tools has been a nice gimmick, but in the end, all you have to change is typing "catkin_lint" instead of "catkin lint". And maybe I can soften the blow a bit with this: catkin_lint has bash auto-completion, which doesn't work if you run it as catkin_tools plugin.

Revision history for this message
John Morris (1pt1nq88tvxvjiijcixknc4iaqh3-na9c-8aho930n7szvk8tyqp2yd0cny5gr) wrote :

I appreciate the thoughtful explanation, and I wasn't aware of the Debian policy that strongly discourages shipping programs as libraries.

Working around that policy, it looks like the problem still could be addressed by breaking out separate library and runtime packages.

However, I've moved on and my workflow has somehow been adjusted (I forget now), so I won't push this issue any further. Feel free to close, and thank you for maintaining the package.

Changed in ros-catkin-lint (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.