Skip to content

Add Pop! OS detector#199

Merged
dirk-thomas merged 1 commit intoros-infrastructure:masterfrom
emersonknapp:popos-detect
May 28, 2020
Merged

Add Pop! OS detector#199
dirk-thomas merged 1 commit intoros-infrastructure:masterfrom
emersonknapp:popos-detect

Conversation

@emersonknapp
Copy link
Copy Markdown
Contributor

@emersonknapp emersonknapp commented May 5, 2020

I use Pop! OS linux distro https://pop.system76.com/
It's Ubuntu-based so it works fine for ros dev.
But rosdep fails because it can't detect the OS.
Adding a detector here for it.

Signed-off-by: Emerson Knapp emerson.b.knapp@gmail.com

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
@emersonknapp
Copy link
Copy Markdown
Contributor Author

emersonknapp commented May 5, 2020

Question: with this change, rosdep doesn't choose the "ubuntu" option for resolving dependencies, is that something that would happen here? I notice there is a Mint matcher, but don't see any Mint in the rosdistro rules - how does that work?

With this change: rosdep update now succeeds when it did not before.

But rosdep resolve now

Unsupported OS: pop
Supported OSes are [alpine, arch, cygwin, debian, ubuntu, gentoo, nixos, openembedded, opensuse, osx, fedora, rhel, slackware, freebsd]

And rosdep resolve --os=ubuntu:focal works, but

(venv) 8:57:46 ➜ rosdep install --simulate --os=ubuntu:focal python3-twisted                                                                                                

ERROR: Rosdep cannot find all required resources to answer your query
Missing resource python3-twisted

@mikaelarguedas
Copy link
Copy Markdown
Contributor

mikaelarguedas commented May 6, 2020

Love it when I face an issue and I find a PR already opened for it ❤️

But rosdep resolve now [...]

I opened ros-infrastructure/rosdep#757 that should solve that problem and give the following output:

$ rosdep resolve python3-twisted
WARNING: ROS_PYTHON_VERSION is unset. Defaulting to 3
rosdep detected OS: [pop] aliasing it to: [ubuntu]
#apt
python3-twisted

rosdep install --simulate --os=ubuntu:focal python3-twisted
ERROR: Rosdep cannot find all required resources to answer your query
Missing resource python3-twisted

This one looks more like a misuse of rosdep install.
Some threads on ROS answers give some explaination about this e.g. https://answers.ros.org/question/348230/how-do-i-use-rosdep-install-to-install-individual-dependencies/

@emersonknapp
Copy link
Copy Markdown
Contributor Author

Oh - perfect! I didn't know about the aliasing logic in rosdep - I was just trying to get install to work, I can see that the --os override is not the right way to go.

@mikaelarguedas
Copy link
Copy Markdown
Contributor

Oh - perfect! I didn't know about the aliasing logic in rosdep - I was just trying to get install to work, I can see that the --os override is not the right way to go.

OS override is a totally valid way of doing it. The aliasing is just syntactic sugar on top to avoid having to pass the --os flag.

The following should work even with no alias defined

mkdir -p /tmp/ws && cd /tmp/ws
git clone https://github.com/eclipse-cyclonedds/cyclonedds src/cyclonedds
rosdep install -s --from-paths src --ignore-src --os=ubuntu:focal
#[apt] Installation commands:
  sudo -H apt-get install libcunit1-dev

The confusing part is that rosdep install never takes rosdep keys as arguments (like python3-twisted) but only operates on ROS packages on your path or paths to ros packages.

@emersonknapp
Copy link
Copy Markdown
Contributor Author

Oh! Yeah ok I knew this, wasn't thinking about it - I just pattern-matched from resolve to install.

Copy link
Copy Markdown
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I didn't find a docker container in which to validate it though so I'll have to assume it's good with the detection.

@emersonknapp
Copy link
Copy Markdown
Contributor Author

I can attest that it's working on my pop 20.04. I think it was not relevant in pre-20 releases because it reported "Ubuntu" for that field of lsb_release.

I also can't find a docker image of pop. Makes sense since it's mostly just the desktop environment, but yeah that makes it hard to test. Maybe just second point of validation from @mikaelarguedas is good?

@mm318
Copy link
Copy Markdown

mm318 commented May 28, 2020

Hi @mikaelarguedas, did you get a chance to test this fix on your Pop! OS environment?

@dirk-thomas dirk-thomas merged commit 9c1dc91 into ros-infrastructure:master May 28, 2020
@mikaelarguedas
Copy link
Copy Markdown
Contributor

Hi @mikaelarguedas, did you get a chance to test this fix on your Pop! OS environment?

Yes, I used it happily on May 6th along ros-infrastructure/rosdep#757. Didnt have much need to run rosdep since then

@mikaelarguedas
Copy link
Copy Markdown
Contributor

Friendly request for a new release of rospkg including this PR to unlock ros-infrastructure/rosdep#757

@dirk-thomas
Copy link
Copy Markdown
Member

I was waiting for another pending PR but since it didn't get any attention yet I just 🚢-ed 1.2.7.

@mikaelarguedas
Copy link
Copy Markdown
Contributor

Thanks! 🚢

@dirk-thomas dirk-thomas added this to the 1.2.7 milestone Jun 24, 2020
@ros-discourse
Copy link
Copy Markdown

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2020-07-16/15468/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants