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

catkin_prepare_release should validate metapackages #404

Merged
merged 3 commits into from
Apr 9, 2013
Merged

Conversation

wjwwood
Copy link
Member

@wjwwood wjwwood commented Apr 5, 2013

Specifically that they have valid CMakeLists.txt. A lot of people are going to run into this problem while releasing with bloom. It would be nice to have this tool check.

It could output:

cat <<EOF
Metapackage <metapackage_name> does not have a valid CMakeLists.txt, therefore it does not conform to REP-0127, see: http://ros.org/reps/rep-0127.html#metapackage

The CMakeLists.txt should look like this:
<CMakeLists.txt that was expected>
EOF

Instead of its normal command output, which would be safe for people doing something like this:

`catkin_prepare_release`

@wjwwood
Copy link
Member Author

wjwwood commented Apr 2, 2013

It should also check that the package.xml has a <buildtool_depend> on catkin.

@wjwwood
Copy link
Member Author

wjwwood commented Apr 5, 2013

@dirk-thomas and @tfoote for review

@wjwwood
Copy link
Member Author

wjwwood commented Apr 5, 2013

Error output looks something like this:

Invalid metapackage at path '/Users/william/devel/catkin_pkg/test/data/metapackages/no_cmake':
  Metapackage 'no_cmake': No CMakeLists.txt

See requirements for metapackages: http://ros.org/reps/rep-0127.html#metapackage

Or

WARNING: Metapackage "invalid_depends" should not have other dependencies besides a buildtool_depend on catkin and run_depends.
Invalid metapackage at path '/Users/william/devel/catkin_pkg/test/data/metapackages/invalid_depends':
  Metapackage 'invalid_depends': Has build, buildtool, and/or test depends, but only run depends are allowed (except buildtool catkin)

See requirements for metapackages: http://ros.org/reps/rep-0127.html#metapackage

The extra WARNING: ... line is coming from find_packages which checks a few things about metapackages.

@tfoote
Copy link
Member

tfoote commented Apr 5, 2013

+1

metapackage.validate_metapackage(path, package, warnings=True)
except metapackage.InvalidMetapackage as e:
print("Invalid metapackage at path '%s':\n %s\n" % (os.path.abspath(path), str(e)))
print("See requirements for metapackages: %s" % metapackage.DEFINITION_URL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these error message be printed to , file=sys.stderr?

@wjwwood
Copy link
Member Author

wjwwood commented Apr 9, 2013

@dirk-thomas updated for review again.

@dirk-thomas
Copy link
Member

+1

@wjwwood
Copy link
Member Author

wjwwood commented Apr 9, 2013

I will wait to merge this until ros-infrastructure/catkin_pkg#40 is merged and catkin_pkg 0.1.11 is released.

wjwwood added a commit that referenced this pull request Apr 9, 2013
catkin_prepare_release should validate metapackages
@wjwwood wjwwood merged commit 4abcf8f into groovy-devel Apr 9, 2013
@wjwwood wjwwood deleted the issue_404 branch April 9, 2013 22:58
dirk-thomas added a commit that referenced this pull request May 1, 2013
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.

3 participants