ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The place to look first is the migration guide of the specific distribution. For Hydro this is this guide.
Your solution to condition 1 is very dirty in my eyes. It would cause much headache in the future.
The second condition is the one that actually occurs often. Just copy-pasting a package can work, but you may have to migrate this package to. So you should fork the package, port it to the new distro and do a pull request.
Solution 2 is also possible. But it would be much easier to contact the maintainer of the old package and ask what they use with the new distro.