bchretien / arch-ros-stacks

:package: AUR packages of ROS stacks.
46 stars 26 forks source link

Automatic tool for rebuilding packages #63

Open pryre opened 7 years ago

pryre commented 7 years ago

While we're still in the phase of using the AUR, is there anyway to schedule a rebuild on packages that have makedepends updated?

A core example seems to be the boost/poco libraries updating, which causes issues all the way up certain ROS packages.

My suggested solution would be to have a tool to do a reverse scan of dependencies for such dependencies and the rebuild all the required packages. The issue is that running something like "pacman -Qi boost" only list the run dependencies, and not the make dependencies. For example, "ros-kinetic-roscpp" and "ros-kinetic-rosout" are not listed when running this command, but definitely need to be rebuilt.

Perhaps this is an issue within the dependency tree itself for a lot of these packages?

zootboy commented 7 years ago

I'm assuming you mean to bump the pkgrel values whenever this happens. There are...mixed opinions about doing that. I tend to fall on the side of letting users sort things out themselves. While AUR helpers are quite handy, especially for large and complex dependency trees, they are still a crutch.

Now, as I understand it, the way the official Arch repos / build server works, whenever a package gets bumped, all packages that are deps of that package get rebuilt. This solves that problem, and is really what anyone using AUR packages should be doing as well. I'm certainly guilty of not doing this, but I accept the risk of encountering a missing .so loader message every once in a while.

As for the makedeps vs deps thing, the whole point of the separation is that makedeps are only relevant during build. If ros-kinetic-roscpp breaks when boost is updated, then it absolutely should have boost as a regular dep. File an issue or submit a patch PR upstream for any packages that have missing deps. For example, the roscpp package file that needs fixing is: https://github.com/ros/ros_comm/blob/kinetic-devel/ros_comm/package.xml

pryre commented 7 years ago

In retrospect, I think I agree with the bumping of pkgrel values an user responsibility. The thing that really gets me is fixing 1 package at a time, not knowing what the next one you need is going to be. As I said, being able to rdepends with pacman is very useful for most of these situations, but not all.

The specific situations I am talking about are programs that compile to specific .so versions. As far as I was aware, the whole point of .so libs was so you didn't have to do that! Seeing as this is most likely an upstream issue, I suppose I'll take it there.

Thanks!

zootboy commented 7 years ago

With regards to the .so thing, the whole reason for .so versions is to indicate ABI-breaking changes. With a big library like Boost, whenever any change breaks the ABI, it needs a soname bump. It would be nice if there was a more granular mechanism for that, but there isn't. Thankfully, rebuilds aren't hard, and Boost soname bumps don't usually break things.

koniarik commented 7 years ago

Hi!,

I was playing with aur tools, and found out that it's pretty trivial to actually get recursive dependency list for specific AUR package. (And separate AUR/repository dependencies, "aurchain")

So, I've got scrip that for given list of "updated packages", can update all watched packages (which are ros-kinetic-* for me) that has some updated package as recursive dependency. (And update tham in correct dependency order, little graph/topology theory here)

I think that it should be easy to create script that based on build date of any dependency, can update pkgrel in any package. Which would make working with ros in arch much easier.

Or, I think it's possible to write script for users, that can solve that on "user side". Something that would scan given list of packages and in case some of it's dependency got newer build date than actual package -> reinstall it. I was thinking of tool that could get list of watched packages on STDIN and put packages that needs update on STDOUT.

however, getting recursive dependency tree is somehow slow with aurchain, while I could easily work with "get dependencies of aur package" (I don't really need recursive one) I did not yet find some KISS way of doing that.

Anyway, would somebody interested in any of this?

zootboy commented 7 years ago

If you're just trying to get first-order deps of a given package, libalpm does that. There's even python bindings for it: https://github.com/jelly/pyalpm