<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Contributing rosdep rules — rosdep 0.10.33 documentation</title> <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: '0.10.33', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="rosdep 0.10.33 documentation" href="index.html" /> <link rel="next" title="rosdep YAML format" href="rosdep_yaml_format.html" /> <link rel="prev" title="rosdep command reference" href="commands.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="rosdep_yaml_format.html" title="rosdep YAML format" accesskey="N">next</a> |</li> <li class="right" > <a href="commands.html" title="rosdep command reference" accesskey="P">previous</a> |</li> <li><a href="contents.html">rosdep 0.10.33 documentation</a> »</li> </ul> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="contents.html"> <img class="logo" src="_static/ros.png" alt="Logo"/> </a></p> <h3><a href="contents.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Contributing rosdep rules</a><ul> <li><a class="reference internal" href="#summary">Summary</a><ul> <li><a class="reference internal" href="#fork-the-rosdistro-github-repository">Fork the rosdistro GitHub repository</a></li> <li><a class="reference internal" href="#point-your-sources-list-d-at-your-forked-repository">Point your sources.list.d at your forked repository</a></li> <li><a class="reference internal" href="#make-your-changes-to-your-forked-repository">Make your changes to your forked repository</a></li> <li><a class="reference internal" href="#make-sure-that-your-rules-work">Make sure that your rules work</a></li> <li><a class="reference internal" href="#submit-a-pull-request-with-your-updated-rules">Submit a pull request with your updated rules</a></li> </ul> </li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="commands.html" title="previous chapter">rosdep command reference</a></p> <h4>Next topic</h4> <p class="topless"><a href="rosdep_yaml_format.html" title="next chapter">rosdep YAML format</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/contributing_rules.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="contributing-rosdep-rules"> <h1>Contributing rosdep rules<a class="headerlink" href="#contributing-rosdep-rules" title="Permalink to this headline">¶</a></h1> <p>In order to contribute rosdep rules, you should first make sure that you are familiar with the <a class="reference internal" href="rosdep_yaml_format.html#rosdep-yaml"><em>rosdep.yaml format</em></a>.</p> <div class="section" id="summary"> <h2>Summary<a class="headerlink" href="#summary" title="Permalink to this headline">¶</a></h2> <p>There are several steps to contributing rosdep rules. You will create a copy of the database on GitHub, point your own rosdep to use it, make some changes, and then ask that they be included back in the main database.</p> <p>In short:</p> <blockquote> <div><ol class="arabic simple"> <li>Fork <a class="reference external" href="https://github.com/ros/rosdistro">https://github.com/ros/rosdistro</a></li> <li>Update your <tt class="docutils literal"><span class="pre">/etc/ros/rosdep/sources.list.d</span></tt> to use this fork</li> <li>Modify your fork to have new rules</li> <li>Test your changes</li> <li>Send a pull request to have your changes included in the main database</li> </ol> </div></blockquote> <div class="section" id="fork-the-rosdistro-github-repository"> <h3>Fork the rosdistro GitHub repository<a class="headerlink" href="#fork-the-rosdistro-github-repository" title="Permalink to this headline">¶</a></h3> <p>The main rosdep database is stored in files in the “rosdistro” repository in the “ros” project on GitHub:</p> <p><a class="reference external" href="https://github.com/ros/rosdistro">https://github.com/ros/rosdistro</a></p> <p>Start by forking this repository so you have your own copy of the database to work with. Next, you’ll point your local rosdep to use this database instead.</p> </div> <div class="section" id="point-your-sources-list-d-at-your-forked-repository"> <h3>Point your sources.list.d at your forked repository<a class="headerlink" href="#point-your-sources-list-d-at-your-forked-repository" title="Permalink to this headline">¶</a></h3> <p>The default sources list for rosdep uses the following files:</p> <div class="highlight-python"><pre>yaml https://github.com/ros/rosdistro/raw/master/rosdep/base.yaml yaml https://github.com/ros/rosdistro/raw/master/rosdep/python.yaml yaml https://github.com/ros/rosdistro/raw/master/rosdep/osx-homebrew.yaml osx</pre> </div> <p>Create a new file in <tt class="docutils literal"><span class="pre">/etc/ros/rosdep/sources.list.d/</span></tt> that points at your forked repository instead. The filename should use a lower number so it is processed first.</p> <p>Now that your rosdep is using the new database, you’re ready to make and test your changes.</p> </div> <div class="section" id="make-your-changes-to-your-forked-repository"> <h3>Make your changes to your forked repository<a class="headerlink" href="#make-your-changes-to-your-forked-repository" title="Permalink to this headline">¶</a></h3> <p>The repository contains the following files:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">rosdep/osx-homebrew.yaml</span></tt>: Rules for OS X Homebrew</li> <li><tt class="docutils literal"><span class="pre">rosdep/python.yaml</span></tt>: Python-specific dependencies</li> <li><tt class="docutils literal"><span class="pre">rosdep/base.yaml</span></tt>: Everything else</li> </ul> <p>Edit the appropriate file(s) for your change, i.e., if you are contributing a Homebrew rule, only edit <tt class="docutils literal"><span class="pre">osx-homebrew.yaml</span></tt>, if you are contributing a rule for a Python library, only edit <tt class="docutils literal"><span class="pre">python.yaml</span></tt>, and, otherwise, put your rule in <tt class="docutils literal"><span class="pre">base.yaml</span></tt>.</p> </div> <div class="section" id="make-sure-that-your-rules-work"> <h3>Make sure that your rules work<a class="headerlink" href="#make-sure-that-your-rules-work" title="Permalink to this headline">¶</a></h3> <p>Update your local index:</p> <div class="highlight-python"><pre>rosdep update</pre> </div> <p>Test your new rules:</p> <div class="highlight-python"><pre>rosdep resolve <key-name></pre> </div> <p>Test with different OS rules:</p> <div class="highlight-python"><pre>rosdep resolve <key-name> --os=OS_NAME:OS_VERSION</pre> </div> </div> <div class="section" id="submit-a-pull-request-with-your-updated-rules"> <h3>Submit a pull request with your updated rules<a class="headerlink" href="#submit-a-pull-request-with-your-updated-rules" title="Permalink to this headline">¶</a></h3> <p>Use GitHub’s pull request mechanism to request that your updates get included in the main databases.</p> <p>After your request has been accepted, you can undo your changes to <tt class="docutils literal"><span class="pre">/etc/ros/rosdep/sources.list.d</span></tt>.</p> </div> </div> </div> </div> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="rosdep_yaml_format.html" title="rosdep YAML format" >next</a> |</li> <li class="right" > <a href="commands.html" title="rosdep command reference" >previous</a> |</li> <li><a href="contents.html">rosdep 0.10.33 documentation</a> »</li> </ul> </div> <div class="footer"> © Copyright 2011, Willow Garage. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>