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

`install --skip-keys="%pkg-a%" pulling in transitive dependency of pkg-a #983

Open
130s opened this issue Aug 21, 2024 · 0 comments
Open

Comments

@130s
Copy link

130s commented Aug 21, 2024

Originally from space-ros/space-ros#189 (reply in thread)

Clarification first

Is rosdep install --skip-keys="pkg-a pkg-b" meant to skip not just the pkgs pkg-a, pkg-b but also the dependency of those 2 pkgs? That's what I expect, but it's not clear from its help.

Citing help on humble
  --skip-keys=SKIP_KEYS
                        Affects the 'check' and 'install' verbs. The specified
                        rosdep keys will be ignored, i.e. not resolved and not
                        installed. The option can be supplied multiple times.
                        A space separated list of rosdep keys can also be
                        passed as a string. A more permanent solution to
                        locally ignore a rosdep key is creating a local rosdep
                        rule with an empty list of packages (include it in
                        /etc/ros/rosdep/sources.list.d/ before the defaults).

If the understanding above is wrong, don't read further, this ticket should be immediately closed.

Issue

rosdep install --skip-keys="pkg-a pkg-b" seems to skip pkg-a, pkg-b pkgs but still installs the dependency of those 2 pkgs.

Verifying the issue statement

In the test done (explained in the folded clause), I expect the transitive dependency (opengl-related pkgs) won't get installed.

Detail of the verification step

Test I did is a bit too elaborated unnecessarilly. Hope it's still valid test to verify the issue...

Spec of a quick test I did:

  • Done on osrf/space-ros:humble-2024.07.0 Docker image.

  • In this test, I run rosdep with rviz pkg suite that is customized for this test only. And see if OPENGL-related pkgs get installed. Dep tree in this custom suite looks like the following graph (pkgs that are not mentioned here are removed for the sake of the test) so opengl is a transitive dependency, and if it does get installed that's the reported issue:

    rviz2
    |- rviz_ogre_vendor
      |- opengl
      |- :
    |- rviz_rendering
      |- libqt5-opengl
      |- :
    
    More detail of the test
    • I deleted all other pkgs. Also converted rviz2 pkg to only depend on these 2 pkgs i.e.:
      <buildtool_depend>ament_cmake</buildtool_depend>
      <depend>rviz_ogre_vendor</depend>
      <depend>rviz_rendering</depend>
      
  • rosdep key of opengl seems to install libgl1-mesa-dev, libglu1-mesa-dev on Ubuntu.

  • On this Docker img, the pkgs in question are not installed yet.

    $ apt-cache policy libglu1-mesa-dev
    libglu1-mesa-dev:
      Installed: (none)
      Candidate: 9.0.2-1
    :
    spaceros-user@130s-p16s:~/test$ apt-cache policy libgl1-mesa-dev
    libgl1-mesa-dev:
      Installed: (none)
      Candidate: 24.2.0~kisak3~j
      Version table:
         24.2.0~kisak3~j 500
            500 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu jammy/main amd64 Packages
    :
    

Prep

$ mkdir ~/test && cd ~/test

$ echo "OPT-1 Manually prepping test pkg suite" && git clone https://github.com/ros2/rviz.git && cd rviz && git checkout humble && echo "Removing except rviz_ogre_vendor  rviz_rendering" && rm -fr docs  LICENSE  README.md   rviz_assimp_vendor  rviz_common  rviz_default_plugins    rviz_rendering_tests  rviz_visual_testing_framework

OR

$ echo "OPT-2 premaid pkg suite" && git clone https://github.com/130s/rviz.git && cd rviz && git checkout humble_test-rosdep

$ cd - && rosdep update
$ rosdep install --from-paths . --ignore-src --skip-keys="rviz_ogre_vendor rviz_rendering"

:

Result

I do see the 2 pkgs (the rosdep key opengl corresponds to) get installed.

$ apt-cache policy libgl1-mesa-dev
libgl1-mesa-dev:
  Installed: 24.2.0~kisak3~j
  Candidate: 24.2.0~kisak3~j
  Version table:

$ apt-cache policy libglu1-mesa-dev
libglu1-mesa-dev:
  Installed: 9.0.2-1
  Candidate: 9.0.2-1
  Version table:
 *** 9.0.2-1 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
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

No branches or pull requests

1 participant