Commit 7767e78d authored by Jochen Sprickerhof's avatar Jochen Sprickerhof

New upstream version 0.12.2

parent 2e1805e5
language: python
python:
- "2.6"
- "2.7"
- "3.4"
matrix:
include:
- os: linux
python: 2.6
- os: linux
python: 2.7
- os: linux
python: 3.4
- os: osx
language: generic
env: PYTHON_INSTALLER=brew
- os: osx
language: generic
env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=2.7.14
- os: osx
language: generic
env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=3.6.4
# command to install dependencies
install:
# develop seems to be required by travis since 02/2013
- source .travis/install.sh
- python --version
- pip install PyYAML argparse rospkg vcstools catkin_pkg python-dateutil rosdistro
- python setup.py build develop
- pip install nose coverage
- pip install -e .
- pip install nose coverage flake8 mock codecov
# command to run tests
script:
- nosetests --with-coverage --cover-package=rosdep2 --with-xunit test
after_script:
- codecov
notifications:
email: false
#!/bin/bash
do_install()
{
set -e
if [[ $TRAVIS_OS_NAME == 'osx' && $PYTHON_INSTALLER == 'pyenv' ]]; then
brew install pyenv-virtualenv
pyenv versions
eval "$(pyenv init -)"
pyenv install $TRAVIS_PYTHON_VERSION
PYTHON_ENV_NAME=virtual-env-$TRAVIS_PYTHON_VERSION
pyenv virtualenv $TRAVIS_PYTHON_VERSION $PYTHON_ENV_NAME
pyenv activate $PYTHON_ENV_NAME
elif [[ $TRAVIS_OS_NAME == 'osx' && $PYTHON_INSTALLER == 'brew' ]]; then
# nose 1.3.7 creates /usr/local/man dir if it does not exist.
# The operation fails because current user does not own /usr/local. Create the dir manually instead.
sudo mkdir /usr/local/man
sudo chown -R $(whoami) $(brew --prefix)/*
export PATH=$(pwd)/.travis/shim:$PATH
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
fi
}
do_install
#!/bin/sh
# This wrapper allows installation to call pip and it actually be
# the pip2 that's part of brewed Python, rather than the missing
# system pip.
pip2 $@
exit $?
0.12.2 (2018-03-21)
-------------------
- Fix bug introduced in https://github.com/ros-infrastructure/rosdep/pull/521, reported in https://github.com/ros-infrastructure/rosdep/issues/589
- https://github.com/ros-infrastructure/rosdep/pull/585
0.12.1 (2018-02-08)
-------------------
- Revert "Use ROS_ETC_DIR environment variable" to fix regression introduced in 0.12.0
- https://github.com/ros-infrastructure/rosdep/pull/584
0.12.0 (2018-02-07)
-------------------
- Support for wildcard OS versions as specified in the updated REP 111
- https://github.com/ros-infrastructure/rosdep/pull/573
- Add conflict with Debian package python-rosdep2
- https://github.com/ros-infrastructure/rosdep/pull/579
- Remove redundant dependency checks
- https://github.com/ros-infrastructure/rosdep/pull/556
- Update the FreeBSD installer
- https://github.com/ros-infrastructure/rosdep/pull/574
- Fix detection of installed rpms and warn if slow method is being used
- https://github.com/ros-infrastructure/rosdep/pull/568
- Support for installing virtual packages (Debian)
- https://github.com/ros-infrastructure/rosdep/pull/521
- Remove non-interactive mode in slackware
- https://github.com/ros-infrastructure/rosdep/pull/553
- Use ROS_ETC_DIR environment variable
- https://github.com/ros-infrastructure/rosdep/pull/551
- Add __repr__ for SourceInstall
- https://github.com/ros-infrastructure/rosdep/pull/543
- Keep dependencies order
- https://github.com/ros-infrastructure/rosdep/pull/545
- Fix db command on OS X
- https://github.com/ros-infrastructure/rosdep/pull/541
0.11.8 (2017-08-03)
-------------------
- Fix handling of metapackages
......
rosdep
------
[![Build status](https://travis-ci.org/ros-infrastructure/rosdep.svg?branch=master)](https://travis-ci.org/ros-infrastructure/rosdep)
[![codecov](https://codecov.io/gh/ros-infrastructure/rosdep/branch/master/graph/badge.svg)](https://codecov.io/gh/ros-infrastructure/rosdep)
rosdep is a command-line tool for installing system dependencies. For *end-users*, rosdep helps you install system dependencies for software that you are building from source. For *developers*, rosdep simplifies the problem of installing system dependencies on different platforms. Instead of having to figure out which debian package on Ubuntu Oneiric contains Boost, you can just specify a dependency on 'boost'.
......
#!/usr/bin/env python
# Copyright (c) 2011, Willow Garage, Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
......@@ -13,7 +13,7 @@
# * Neither the name of the Willow Garage, Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
......@@ -40,13 +40,15 @@ from rosdep2 import InstallFailed
from rosdep2.platforms import source
NAME='rosdep-source'
def install_main():
parser = OptionParser(usage="usage: %prog install <rdmanifest-url>", prog=NAME)
options, args = parser.parse_args()
if len(args) != 2:
parser.error("please specify one and only one rdmanifest url")
if args[0] != 'install':
parser.error("currently only support the 'install' command")
parser.error("currently only support the 'install' command")
rdmanifest_url= args[1]
try:
if os.path.isfile(rdmanifest_url):
......@@ -57,5 +59,6 @@ def install_main():
print("ERROR: installation failed:\n%s"%e, file=sys.stderr)
sys.exit(1)
if __name__ == '__main__':
install_main()
......@@ -5,23 +5,23 @@ exec(open(os.path.join(os.path.dirname(__file__), 'src', 'rosdep2', '_version.py
setup(
name='rosdep',
version=__version__,
version=__version__, # noqa:F821
packages=['rosdep2', 'rosdep2.platforms'],
package_dir={'': 'src'},
install_requires=['catkin_pkg', 'rospkg >= 1.0.37', 'rosdistro >= 0.4.0', 'PyYAML >= 3.1'],
test_suite='nose.collector',
test_requires=['mock', 'nose >= 1.0'],
scripts=['scripts/rosdep', 'scripts/rosdep-source'],
author="Tully Foote, Ken Conley",
author_email="tfoote@osrfoundation.org",
url="http://wiki.ros.org/rosdep",
download_url="http://download.ros.org/downloads/rosdep/",
author='Tully Foote, Ken Conley',
author_email='tfoote@osrfoundation.org',
url='http://wiki.ros.org/rosdep',
download_url='http://download.ros.org/downloads/rosdep/',
keywords=['ROS'],
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: BSD License"],
description="rosdep package manager abstrction tool for ROS",
long_description="Command-line tool for installing system "
"dependencies on a variety of platforms.",
license="BSD"
'Programming Language :: Python',
'License :: OSI Approved :: BSD License'],
description='rosdep package manager abstraction tool for ROS',
long_description='Command-line tool for installing system '
'dependencies on a variety of platforms.',
license='BSD'
)
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
......@@ -12,7 +12,7 @@
# * Neither the name of the Willow Garage, Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
......@@ -38,20 +38,20 @@ from ._version import __version__
import sys
from .installers import InstallerContext, Installer, \
PackageManagerInstaller
PackageManagerInstaller
from .core import RosdepInternalError, InstallFailed, UnsupportedOs, \
InvalidData, DownloadFailure
InvalidData, DownloadFailure
from .model import RosdepDatabase, RosdepDatabaseEntry
from .lookup import RosdepDefinition, RosdepView, RosdepLookup, \
ResolutionError
ResolutionError
from .loader import RosdepLoader
# don't let import error take down code as when attempting to compute version number
try:
from .rospkg_loader import RosPkgLoader
except ImportError:
print("Cannot import rospkg, rosdep will not function properly",
file=sys.stderr)
print('Cannot import rospkg, rosdep will not function properly',
file=sys.stderr)
def create_default_installer_context(verbose=False):
......@@ -64,10 +64,11 @@ def create_default_installer_context(verbose=False):
from .platforms import pip
from .platforms import gem
from .platforms import redhat
from .platforms import freebsd
from .platforms import slackware
from .platforms import source
platform_mods = [arch, cygwin, debian, gentoo, opensuse, osx, redhat, slackware]
platform_mods = [arch, cygwin, debian, gentoo, opensuse, osx, redhat, slackware, freebsd]
installer_mods = [source, pip, gem] + platform_mods
context = InstallerContext()
......@@ -76,31 +77,33 @@ def create_default_installer_context(verbose=False):
# setup installers
for m in installer_mods:
if verbose:
print("registering installers for %s"%(m.__name__))
print('registering installers for %s' % (m.__name__))
m.register_installers(context)
# setup platforms
for m in platform_mods:
if verbose:
print("registering platforms for %s"%(m.__name__))
print('registering platforms for %s' % (m.__name__))
m.register_platforms(context)
return context
from . import gbpdistro_support
from . import gbpdistro_support # noqa
gbpdistro_support.create_default_installer_context = create_default_installer_context
#TODO: this was partially abstracted from main() for another library,
# TODO: this was partially abstracted from main() for another library,
# but it turned out to be unnecessary. Not sure it's worth maintaining
# separately, especially in the top-level module.
def get_default_installer(installer_context=None, verbose=False):
"""
Based on the active OS and installer context configuration, get
the installer to use and the necessary configuration state
(installer keys, OS name/version).
:returns: installer, installer_keys, default_key, os_name, os_version.
:returns: installer, installer_keys, default_key, os_name, os_version.
"""
if installer_context is None:
installer_context = create_default_installer_context(verbose=verbose)
......@@ -114,12 +117,14 @@ def get_default_installer(installer_context=None, verbose=False):
installer = installer_context.get_installer(default_key)
return installer, installer_keys, default_key, os_name, os_version
__all__ = ['InstallerContext', 'Installer', 'PackageManagerInstaller',
'RosdepInternalError', 'InstallFailed', 'UnsupportedOs', 'InvalidData',
'DownloadFailure',
'RosdepDatabase', 'RosdepDatabaseEntry',
'RosdepDefinition', 'RosdepView', 'RosdepLookup', 'ResolutionError',
'RosdepLoader', 'RosPkgLoader',
'get_default_installer',
'create_default_installer_context',
]
__all__ = [
'InstallerContext', 'Installer', 'PackageManagerInstaller',
'RosdepInternalError', 'InstallFailed', 'UnsupportedOs', 'InvalidData',
'DownloadFailure',
'RosdepDatabase', 'RosdepDatabaseEntry',
'RosdepDefinition', 'RosdepView', 'RosdepLookup', 'ResolutionError',
'RosdepLoader', 'RosPkgLoader',
'get_default_installer',
'create_default_installer_context',
]
__version__ = '0.11.8'
__version__ = '0.12.2'
......@@ -6,7 +6,7 @@ import sys
try:
from catkin_pkg.packages import find_packages
except ImportError:
print("catkin_pkg was not detected, please install it.",
print('catkin_pkg was not detected, please install it.',
file=sys.stderr)
sys.exit(1)
......@@ -28,20 +28,20 @@ def find_catkin_packages_in(path, verbose=False):
path = os.path.abspath(path)
if path in _catkin_packages_cache:
if verbose:
print("found in cache.", file=sys.stderr)
print('found in cache.', file=sys.stderr)
return _catkin_packages_cache[path]
packages = find_packages(path)
if type(packages) == dict and packages != {}:
package_names = [package.name for package in packages.values()]
if verbose:
print("found " + str(len(packages)) + " packages.")
print('found ' + str(len(packages)) + ' packages.')
for package in package_names:
print(" {0}".format(package))
print(' {0}'.format(package))
_catkin_packages_cache[path] = package_names
return package_names
else:
if verbose:
print("failed to find packages.", file=sys.stderr)
print('failed to find packages.', file=sys.stderr)
return []
......
......@@ -27,20 +27,23 @@ from .platforms.debian import APT_INSTALLER
from .platforms.osx import BREW_INSTALLER
from .platforms.pip import PIP_INSTALLER
from .platforms.redhat import YUM_INSTALLER
from .platforms.freebsd import PKG_INSTALLER
from .rep3 import download_targets_data
from .rosdistrohelper import get_targets
from .rospkg_loader import DEFAULT_VIEW_KEY
from .sources_list import get_sources_list_dir, DataSourceMatcher, SourcesListLoader
class ValidationFailed(Exception):
pass
def call(command, pipe=None):
"""
Copy of call() function from catkin-generate-debian to mimic output
"""
working_dir = '.'
#print('+ cd %s && ' % working_dir + ' '.join(command))
# print('+ cd %s && ' % working_dir + ' '.join(command))
process = Popen(command, stdout=pipe, stderr=pipe, cwd=working_dir)
output, unused_err = process.communicate()
retcode = process.poll()
......@@ -49,6 +52,7 @@ def call(command, pipe=None):
if pipe:
return output
def get_ubuntu_targets(rosdistro):
"""
Get a list of Ubuntu distro codenames for the specified ROS
......@@ -64,16 +68,18 @@ def get_ubuntu_targets(rosdistro):
targets_data['electric'] = {'ubuntu': legacy_targets['electric']}
return targets_data[rosdistro]['ubuntu']
def get_installer(installer_name):
""" Expected installers APT_INSTALLER, YUM_INSTALLER, ..."""
installer_context = create_default_installer_context()
return installer_context.get_installer(installer_name)
def resolve_for_os(rosdep_key, view, installer, os_name, os_version):
"""
Resolve rosdep key to dependencies.
:param os_name: OS name, e.g. 'ubuntu'
:raises: :exc:`rosdep2.ResolutionError`
......@@ -110,8 +116,8 @@ def get_catkin_view(rosdistro_name, os_name, os_version, update=True):
raise ValidationFailed("""rosdep database does not have any sources.
Please make sure you have a valid configuration in:
\t%s
"""%(sources_list_dir))
""" % (sources_list_dir))
# for vestigial reasons, using the roskg loader, but we're only
# actually using the backend db as resolution is not resource-name based
lookup = RosdepLookup.create_from_rospkg(sources_loader=sources_loader)
......
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
......@@ -12,7 +12,7 @@
# * Neither the name of the Willow Garage, Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
......@@ -31,20 +31,23 @@ import os
import sys
import traceback
def rd_debug(s):
if "ROSDEP_DEBUG" in os.environ:
if 'ROSDEP_DEBUG' in os.environ:
print(s)
def print_bold(msg):
"""
print message printed to screen with bold decoration for greater clarity
:param msg: message to print, ``str``
"""
if sys.platform in ['win32']:
print('%s'%msg) #windows console is terrifically boring
print('%s' % msg) # windows console is terrifically boring
else:
print('\033[1m%s\033[0m'%msg)
print('\033[1m%s\033[0m' % msg)
class InvalidData(Exception):
"""
Data is not in valid rosdep format.
......@@ -54,9 +57,11 @@ class InvalidData(Exception):
super(InvalidData, self).__init__(message)
self.origin = origin
class UnsupportedOs(Exception):
pass
class RosdepInternalError(Exception):
def __init__(self, e, message=None):
......@@ -69,33 +74,36 @@ class RosdepInternalError(Exception):
def __str__(self):
return self.message
class CachePermissionError(Exception):
"""Failure when writing the cache."""
pass
class DownloadFailure(Exception):
"""
Failure downloading sources list data for I/O or other format reasons.
"""
pass
class InstallFailed(Exception):
def __init__(self, failure=None, failures=None):
"""
One of failure/failures must be set.
:param failure: single (installer_key, message) tuple.
:param failure: single (installer_key, message) tuple.
:param failures: list of (installer_key, message) tuples
"""
if failures is not None:
self.failures = failures
elif not failure:
raise ValueError("failure is None")
raise ValueError('failure is None')
else:
self.failures = [failure]
def __str__(self):
return '\n'.join(['%s: %s'%(key, message) for (key, message) in self.failures])
return '\n'.join(['%s: %s' % (key, message) for (key, message) in self.failures])
......@@ -74,7 +74,7 @@ class DependencyGraph(defaultdict):
:raises: :exc:`AssertionError` if the rosdep_key is in the traveled keys, indicating a cycle has occurred.
"""
assert rosdep_key not in traveled_keys, "A cycle in the dependency graph occurred with key `%s`." % rosdep_key
assert rosdep_key not in traveled_keys, 'A cycle in the dependency graph occurred with key `%s`.' % rosdep_key
traveled_keys.append(rosdep_key)
for dependency in self[rosdep_key]['dependencies']:
self.detect_cycles(dependency, traveled_keys)
......@@ -92,7 +92,7 @@ class DependencyGraph(defaultdict):
for dependency in self[rosdep_key]['dependencies']:
if dependency not in self:
raise KeyError(
"Invalid Graph Structure: rosdep key `%s` does not exist in the dictionary of resolutions."
'Invalid Graph Structure: rosdep key `%s` does not exist in the dictionary of resolutions.'
% dependency)
self[dependency]['is_root'] = False
# Check each entry for cyclical dependencies
......
......@@ -6,7 +6,7 @@ import yaml
try:
import urlparse
except ImportError:
import urllib.parse as urlparse #py3k
import urllib.parse as urlparse # py3k
import os
from rospkg.os_detect import OS_DEBIAN
......@@ -14,7 +14,6 @@ from rospkg.os_detect import OS_FEDORA
from rospkg.os_detect import OS_OSX
from rospkg.os_detect import OS_UBUNTU
create_default_installer_context = None
from .core import InvalidData, DownloadFailure
from .platforms.debian import APT_INSTALLER
from .platforms.osx import BREW_INSTALLER
......@@ -25,17 +24,19 @@ from .rep3 import download_targets_data # deprecated, will output warning
import warnings
#py3k
create_default_installer_context = None
# py3k
try:
unicode
except:
except NameError:
basestring = unicode = str
# location of an example gbpdistro file for reference and testing
FUERTE_GBPDISTRO_URL = 'https://raw.github.com/ros/rosdistro/' \
+ 'master/releases/fuerte.yaml'
'master/releases/fuerte.yaml'
#seconds to wait before aborting download of gbpdistro data
# seconds to wait before aborting download of gbpdistro data
DOWNLOAD_TIMEOUT = 15.0
......@@ -61,6 +62,7 @@ def get_owner_name(url):
# For compatability url defaults to ''
def gbprepo_to_rosdep_data(gbpdistro_data, targets_data, url=''):
"""
DEPRECATED: the rosdistro file format has changed according to REP137
......@@ -69,23 +71,23 @@ def gbprepo_to_rosdep_data(gbpdistro_data, targets_data, url=''):
:raises: :exc:`InvalidData`
"""
warnings.warn("deprecated: see REP137 and rosdistro", PreRep137Warning)
warnings.warn('deprecated: see REP137 and rosdistro', PreRep137Warning)
# Error reporting for this isn't nearly as good as it could be
# (e.g. doesn't separate gbpdistro vs. targets, nor provide
# origin), but rushing this implementation a bit.
try:
if not type(targets_data) == dict:
raise InvalidData("targets data must be a dict")
raise InvalidData('targets data must be a dict')
if not type(gbpdistro_data) == dict:
raise InvalidData("gbpdistro data must be a dictionary")
raise InvalidData('gbpdistro data must be a dictionary')
if gbpdistro_data['type'] != 'gbp':
raise InvalidData('gbpdistro must be of type "gbp"')
# compute the default target data for the release_name
release_name = gbpdistro_data['release-name']
if not release_name in targets_data:
raise InvalidData("targets file does not contain information "
+ "for release [%s]" % (release_name))
if release_name not in targets_data:
raise InvalidData('targets file does not contain information '
'for release [%s]' % (release_name))
else:
# take the first match
target_data = targets_data[release_name]
......@@ -95,12 +97,12 @@ def gbprepo_to_rosdep_data(gbpdistro_data, targets_data, url=''):
gbp_repos = gbpdistro_data['repositories']
# Ensure gbp_repos is a dict
if type(gbp_repos) != dict:
raise InvalidData("invalid repo spec in gbpdistro data: " + str(gbp_repos)
+ ". Invalid repositories entry, must be dict.")
raise InvalidData('invalid repo spec in gbpdistro data: ' + str(gbp_repos) +
'. Invalid repositories entry, must be dict.')
for rosdep_key, repo in gbp_repos.items():
if type(repo) != dict:
raise InvalidData("invalid repo spec in gbpdistro data: "
+ str(repo))
raise InvalidData('invalid repo spec in gbpdistro data: ' +
str(repo))
for pkg in repo.get('packages', {rosdep_key: None}):
rosdep_data[pkg] = {}
......@@ -125,7 +127,7 @@ def gbprepo_to_rosdep_data(gbpdistro_data, targets_data, url=''):
for t in repo_targets:
if not isinstance(t, basestring):
raise InvalidData("invalid target spec: %s" % (t))
raise InvalidData('invalid target spec: %s' % (t))
# rosdep_data[pkg][OS_UBUNTU][t] = {
rosdep_data[pkg][OS_UBUNTU][t] = {
APT_INSTALLER: {'packages': [deb_package_name]}
......@@ -134,11 +136,12 @@ def gbprepo_to_rosdep_data(gbpdistro_data, targets_data, url=''):
rosdep_data[pkg]['_is_ros'] = True
return rosdep_data
except KeyError as e:
raise InvalidData("Invalid GBP-distro/targets format: missing key: "
+ str(e))
raise InvalidData('Invalid GBP-distro/targets format: missing key: ' +
str(e))
# REP137 compliant
def get_gbprepo_as_rosdep_data(gbpdistro):
"""
:raises: :exc:`InvalidData`
......@@ -167,9 +170,9 @@ def get_gbprepo_as_rosdep_data(gbpdistro):
package_name = package_name.replace('_', '-')
for os_name in distro_file.platforms:
if not os_name in rosdep_data[pkg]:
if os_name not in rosdep_data[pkg]:
rosdep_data[pkg][os_name] = {}
if not os_name in default_installers:
if os_name not in default_installers:
default_installers[os_name] = ctx.get_default_os_installer_key(os_name)
for os_code_name in distro_file.platforms[os_name]:
rosdep_data[pkg][os_name][os_code_name] = {
......@@ -207,5 +210,5 @@ def download_gbpdistro_as_rosdep_data(gbpdistro_url, targets_url=None):
targets_data,
gbpdistro_url)
except Exception as e:
raise DownloadFailure("Failed to download target platform data "
+ "for gbpdistro:\n\t" + str(e))
raise DownloadFailure('Failed to download target platform data '
'for gbpdistro:\n\t' + str(e))
This diff is collapsed.
# Copyright (c) 2011, Willow Garage, Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
......@@ -12,7 +12,7 @@
# * Neither the name of the Willow Garage, Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
......@@ -41,11 +41,12 @@ from .core import InvalidData
ROSDEP_YAML = 'rosdep.yaml'
class RosdepLoader:
"""
Base API for loading rosdep information by package or stack name.
Base API for loading rosdep information by package or stack name.
"""
def load_rosdep_yaml(self, yaml_contents, origin):
"""
Utility routine for unmarshalling rosdep data encoded as YAML.
......@@ -56,7 +57,7 @@ class RosdepLoader:
try:
return yaml.load(yaml_contents)
except yaml.YAMLError as e:
raise InvalidData("Invalid YAML in [%s]: %s"%(origin, e), origin=origin)