ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How do I release a 3rd-party library to Hydro with the same patches as Groovy

asked 2013-05-21 16:31:35 -0500

joq gravatar image

I had to apply very many patches to get libfreenect working on Groovy. I want to release exactly the same patched code to Hydro.

The bloom 3rd-party release tutorial says to follow the Releasing a catkin Package tutorial for successive releases. So, I followed the Releasing into a new ROS Distribution instructions, which are basically the same:

$ bloom-release --ros-distro hydro --new-track libfreenect hydro

That appeared to succeed, but fortunately I checked the result before doing the release. The patch level had been set back from 4 to 0, and none of the patches were applied.

Now I am trying to figure out how to release to Hydro with exactly the same patches used with Groovy.

I started out by checking out the bloom branch and setting the release_inc for hydro to 4. Then I checked out the patches/release/hydro/libfreenect branch, which had no patches, and merged the groovy patches:

$  git merge origin/patches/release/groovy/libfreenect 
Auto-merging patches.conf
CONFLICT (add/add): Merge conflict in patches.conf
Automatic merge failed; fix conflicts and then commit the result.

That did copy over all the patches, which look OK, but the merge failure is in patches.conf:

$ git diff
diff --cc patches.conf
index 2fa3f7a,837aec3..0000000
--- a/patches.conf
+++ b/patches.conf
@@@ -1,6 -1,6 +1,13 @@@
  [patches]
        trim = 
++<<<<<<< HEAD
 +      base = 466830d
 +      trimbase = 
 +      parent = upstream
 +      previous = 39ae840
++=======
+       base = 22a8bed
+       trimbase = 
+       parent = upstream
+       previous = 20c8817
++>>>>>>> origin/patches/release/groovy/libfreenect

I have no clue how to resolve that.

My somewhat-mangled release repository is on github in ros-drivers-gbp/libfreenect-release as bloom-release left it. I am afraid to commit any of these manual changes for fear of destroying all the hard work in my release repository.

What should I do, now?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-05-22 08:04:40 -0500

William gravatar image

updated 2013-05-22 09:27:39 -0500

There is no automated way to migrate patches from one distro release to the next, it is ticketed here:

https://github.com/ros-infrastructure/bloom/issues/116

Release numbers have no bearing on what patches are applied. That number simply gets incremented each time you run bloom, such that you can (re) release a track without any patches and the release increment number will be automatically incremented.

You should not manually set the release increment number and doing so will not change anything but the number which comes after the upstream version.

Only the *.patch files in the patch/* branches might be portable to another branch. The patches.conf and other non-*.patch files are not portable because they are used by bloom for storing state of specific branches.

This is the strategy I would use:

First clean up your release repo:

  • delete your hydro track
  • delete any hydro tags and branches

The above is optional, but it would be nice to clear them out, if you pushed to github (btw never do this until you are satisfied with the results) then you will need to remove the tags and branches from github as well (if you don't bloom will pull them down and use them).

Next I would:

  • do the "Releasing into a new ROS Distribution" tutorial (don't worry about patches at this point)
  • go to the branch that you want to copy patches from, e.g. release/groovy/libfreenect
  • run git-bloom-patch export, this ensures that the patches made here are exported to the corresponding patches/ branch
  • go to the patches/ branch for the branch to copy from, e.g. patches/release/groovy/libfreenect
  • copy the *.patch files somewhere temporary, e.g. /tmp/libfreenect/patches
  • go to the branch you want to copy the patches to, e.g. release/hydro/libfreenect
  • run git am /tmp/libfreenect/patches/*.patch (some of these might not merge if your groovy and hydro upstream versions do not match)
  • run git-bloom-patch export, this is not required, but it just ensures that the patches you just put on this branch get exported to the corresponding patches/ branch for this branch.
  • run git-bloom-release hydro one more time (this ensures that the new patches you just copied over are used in branches and tags downstream of this branch)

That should get you going, but in the future there will be a command help automate this process.

edit flag offensive delete link more

Comments

The release repo is currently after I ran bloom-release --ros-distro hydro --new-track libfreenect hydro. Nothing else was pushed. Can I check out a clean copy and start with your second step (copying patches)?

joq gravatar image joq  ( 2013-05-22 08:46:07 -0500 )edit

Yeah, you can just start with a fresh checkout of that release repo then.

William gravatar image William  ( 2013-05-22 08:47:44 -0500 )edit

Thanks, that seems to work. In step 6, I checked out release/hydro/libfreenect.

joq gravatar image joq  ( 2013-05-22 09:26:50 -0500 )edit

Glad to hear it, sorry this is such a pain, but this just bloom showing how ugly really flexible systems can be. You _can_ do anything, it's just might not be pretty.

William gravatar image William  ( 2013-05-22 09:29:08 -0500 )edit

Not so painful, once you explained how it works. My guess-work was pretty bad, though. At least I realized it wasn't working before hurting the repository.

joq gravatar image joq  ( 2013-05-22 09:51:39 -0500 )edit

Question Tools

Stats

Asked: 2013-05-21 16:31:35 -0500

Seen: 395 times

Last updated: May 22 '13