Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archlinux: use pacman -T to verify installation #476

Merged
merged 1 commit into from
Sep 22, 2016

Conversation

de-vri-es
Copy link
Contributor

Currently rosdep uses pacman -Q to check if a package is installed. However, that does not work with targets provided by a package of a different name.

For example: the eigen package also provides the eigen3 target. Running pacman -Q eigen3 will exit non-zero though, because there is no package named eigen3 installed. Running pacman -T eigen3 will exit with status 0, because the target eigen3 is provided by an installed package.

This PR changes rosdep to use pacman -T.

pacman -T prints the non-installed packages, so it could even be used to implement pacman_detect with a single pacman invocation. I didn't think that was worth the added complexity over the current implementation though.

Copy link
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 reasonable to me, based on the basic documentation.

Are there any Arch users following this who could test?

@hgaiser
Copy link

hgaiser commented Sep 20, 2016

Running pacman -Q eigen3 does indeed return with exit status 1. Running pacman -T eigen3 returns with exit status 0 (and just to verify, running pacman -T eigen33 again returns with exit status 1).

@de-vri-es
Copy link
Contributor Author

I also tested locally. Note that the current behaviour is broken when installing the rosdep key eigen, since it resolves to the package eigen3 on Arch Linux. While in this case it may have been better to have the rosdep key eigen resolve to the eigen package directly, in general it should be possible to have rosdep keys resolve to virtual targets.

@wjwwood wjwwood merged commit d27c193 into ros-infrastructure:master Sep 22, 2016
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.

4 participants