ros-infrastructure / superflore

An extended platform release manager for Robot Operating System
Apache License 2.0
52 stars 33 forks source link

rosdep2.catkin_support.ValidationFailed: rosdep database is not initialized, #166

Closed awesomebytes closed 2 years ago

awesomebytes commented 5 years ago

Hello, I was trying to update teh ebuild for ros-kinetic/sbpl and ros-kinetic/naoqi_driver and both gave me this error. Note that for ros-kinetic/naoqi_libqicore this didn't happen.

superflore-gen-ebuilds --ros-distro kinetic --only sbpl
>>>> Working in temporary directory /tmp/tmpe5oiwtj0
>>>> Creating new branch gentoo-bot-sSGXZjpgTD...
>>>> 
>>>> Regenerating package 'sbpl'...
>>>> Cleaning up temporary directory /tmp/tmpe5oiwtj0
Traceback (most recent call last):
  File "/usr/local/bin/superflore-gen-ebuilds", line 11, in <module>
    load_entry_point('superflore==0.2.1', 'console_scripts', 'superflore-gen-ebuilds')()
  File "/usr/local/lib/python3.6/dist-packages/superflore-0.2.1-py3.6.egg/superflore/generators/ebuild/run.py", line 117, in main
  File "/usr/local/lib/python3.6/dist-packages/superflore-0.2.1-py3.6.egg/superflore/generators/ebuild/gen_packages.py", line 85, in regenerate_pkg
  File "/usr/local/lib/python3.6/dist-packages/superflore-0.2.1-py3.6.egg/superflore/generators/ebuild/gen_packages.py", line 216, in ebuild_text
  File "/usr/local/lib/python3.6/dist-packages/superflore-0.2.1-py3.6.egg/superflore/generators/ebuild/ebuild.py", line 218, in get_ebuild_text
  File "/usr/local/lib/python3.6/dist-packages/superflore-0.2.1-py3.6.egg/superflore/utils.py", line 217, in resolve_dep
  File "/usr/local/lib/python3.6/dist-packages/superflore-0.2.1-py3.6.egg/superflore/rosdep_support.py", line 90, in resolve_rosdep_key
  File "/usr/local/lib/python3.6/dist-packages/superflore-0.2.1-py3.6.egg/superflore/rosdep_support.py", line 46, in get_view
  File "/usr/local/lib/python3.6/dist-packages/rosdep-0.14.0-py3.6.egg/rosdep2/catkin_support.py", line 108, in get_catkin_view
    """)
rosdep2.catkin_support.ValidationFailed: rosdep database is not initialized, please run:
    sudo rosdep init
awesomebytes commented 5 years ago

And I double checked ros-kinetic/naoqi_libqicore and it still re-builds. (I was suspicious something changed meanwhile I did one call to superflore-gen-ebuilds and the next).

svavs commented 2 years ago

Maybe it'll be helpful to someone: a rosdep update as simple user helped me.

nuclearsandwich commented 2 years ago

Maybe it'll be helpful to someone: a rosdep update as simple user helped me.

There is a difference between the lack of initialization in the original post and an out-of-date or un-updated rosdep configuration for a local user.

rosdep init, usually run as sudo rosdep init creates configuration in /etc/ros with the default set of rosdep sources. That needs to be run once in each new environment and can also be used to update sources periodically although they have not changed recently.

whereas rosdep update which should not be run as root fetches the contents of those rosdep sources and generates a local database for use by rosdep locally.

The error message in the initial post and rosdep update aren't directly connected.

Since this error likely has to do with system setup and is several years since the last update. I'll close it for now.

tomkimsour commented 2 years ago

Hi, I have been encountering a similar issue even after rerunning sudo rosdep init then rosdep update

I tried running sudo superflore-gen-ebuilds --ros-distro galactic --only rcutils libatomic --dry-run

File "/usr/lib/python3/dist-packages/rosdep2/catkin_support.py", line 116, in get_catkin_view
    raise ValidationFailed("""rosdep database does not have any sources.
rosdep2.catkin_support.ValidationFailed: rosdep database does not have any sources.
Please make sure you have a valid configuration in:
    /etc/ros/rosdep/sources.list.d

Is running it as sudo an issue ? I tried it running without sudo but this is what I end up with

>>>> "galactic" distro detected...
>>>> Working in temporary directory /tmp/tmp110bzht2
>>>> Creating new branch gentoo-bot-ebWJymArrU...
>>>> 
>>>> Regenerating package 'rcutils'...
!!!! Failed to resolve required dependencies for package rcutils!
!!!!  unresolved: "libatomic"
>>>> Regenerating package 'libatomic'...
!!!! No package to satisfy key 'libatomic'
!!!! No packages generated successfully, exiting.
>>>> Cleaning up temporary directory /tmp/tmp110bzht2

I checked and libatomic1 is installed

Here is the file /etc/ros/rosdep/sources.list.d/20-default.list

# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead