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

catch if package is not found / do not download the data if the target directory is not writeable #1455

Merged
merged 3 commits into from
Sep 14, 2016

Conversation

k-okada
Copy link
Member

@k-okada k-okada commented Sep 14, 2016

Somehow the empty directory is not copied to the release repository, and I think it's ok to not to include sample/trained data into deb package as for now...

https://github.com/jsk-ros-pkg/jsk_recognition/tree/master/jsk_perception/sample/data
https://github.com/tork-a/jsk_recognition-release/tree/debian/indigo/trusty/jsk_perception/data

Current error message is something like this, and if we do not install jsk_perception,

make[4]: Leaving directory `/tmp/jsk_recognition-release/obj-x86_64-linux-gnu'
make -f CMakeFiles/install_sample_data.dir/build.make CMakeFiles/install_sample_data.dir/build
make[4]: Entering directory `/tmp/jsk_recognition-release/obj-x86_64-linux-gnu'
../scripts/install_sample_data.py
Checking md5sum of '/home/k-okada/.ros/data/2016-06-10-23-01-28_in_lab.bag'...
...done
Traceback (most recent call last):
  File "../scripts/install_sample_data.py", line 22, in <module>
    main()
  File "../scripts/install_sample_data.py", line 16, in main
    'sample/data/2016-06-10-23-01-28_in_lab.bag',
  File "/opt/ros/indigo/lib/python2.7/dist-packages/jsk_data/download_data.py", line 103, in download_data
    os.makedirs(osp.dirname(path))
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/opt/ros/indigo/share/jsk_perception/sample/data'
make[4]: *** [CMakeFiles/install_sample_data] Error 1

we'll get

../scripts/install_sample_data.py
Traceback (most recent call last):
  File "../scripts/install_sample_data.py", line 22, in <module>
    main()
  File "../scripts/install_sample_data.py", line 16, in main
    'sample/data/2016-06-10-23-01-28_in_lab.bag',
  File "/opt/ros/indigo/lib/python2.7/dist-packages/jsk_data/download_data.py", line 84, in download_data
    pkg_path = rp.get_path(pkg_name)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 200, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
rospkg.common.ResourceNotFound: jsk_perception
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/opt/ros/indigo/share
ROS path [2]=/opt/ros/indigo/stacks

@k-okada k-okada merged commit 0589d68 into jsk-ros-pkg:master Sep 14, 2016
@k-okada k-okada deleted the do_not_write branch September 14, 2016 05:14
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.

1 participant