juhp / fbrnch

Tool to update fedora packages branches
https://hackage.haskell.org/package/fbrnch
GNU General Public License v2.0
23 stars 3 forks source link

Automatically offer merge in `fbranch parallel -F` #30

Closed oturpe closed 2 years ago

oturpe commented 2 years ago

If I build all Fedora branches with fbrnch build -F, I get offers to merge rawhide to older branches, which is a great feature. However, to save time, I would prefer to build all of them at once with fbrnch parallel -F. I have not been able to find a way to get merge offers with that command. Would it be possible to have that available?

As a side note, for simple cases where I know what I am doing, --assumeyes which skips those interactive prompts would be useful, so I would not have to attend fbrnch while it is doing its work. EDIT: Never mind, from --help I see it is --merge,

oturpe commented 2 years ago

Operating system: Fedora Linux 35 Version information:

$ fbrnch --version
0.9.1.1
juhp commented 2 years ago

BTW fbrnch-1.0.0 is out and in stable Fedora now. So you might want to try it - though I don't believe this behavior has changed fundamentally.

I suppose I can add a --merge option to parallel, but ya so far I was assuming one would run fbrnch merge before running parallel, but I think it is a good suggestion, specially for single packages.

oturpe commented 2 years ago

No change in this behavior with 1.0.0. I suppose it was still in testing when I was trying out fbrnch, hence the older version.

Yes, my use cases are like this: Generally,I only need to update one package at time. Also generally, rawhide can be merged to all branches before building. I want to use fbrnch to reduce manual tasks for these cases. Doing fbrnch merge -F and fbrnch parallel -F already reduces the amount of steps from many to just two. fbrnch build -F would be just a single command, but the build there is sequential, thus it is slow. Hence this request. EDIT: Ok, actually I need three steps. fbrnch parallel does not do bodhi updates, so I need to do fbranch build -F in the end to submit those after building all branches with fbranch parallel.

juhp commented 2 years ago

I am hoping to tackle this soon.

('parallel' was initially developed for building chains of packages: they generally require a sidetag which fbrnch can push to bodhi. For single package parallel branch building, it indeed would make sense to push them to bodhi too.)

Also to add a little more context, the reason this is taking me so long, is that I wish to do a very large refactor of some of the common build steps to avoid duplicating code needed for this both within and across 'build' and 'parallel' code.

gotmax23 commented 2 years ago

For single package parallel branch building, it indeed would make sense to push them to bodhi too.)

+1. I was going to create a separate issue before I realize this was included here.

Also to add a little more context, the reason this is taking me so long, is that I wish to a very large refactor of some of the common build steps to avoid duplicating code needed for this both within and across 'build' and 'parallel' code.

That makes sense. Thanks for all your work on this.

juhp commented 2 years ago

Actually it seems easier to implement than I initially thought... :-)

juhp commented 2 years ago

As a first step I have made the merging manual like it is with build except one needs to specify -m. But this can be changed later (certainly over time).

juhp commented 2 years ago

1.1.1 was just released

oturpe commented 2 years ago

Thank you for working on this. I will give it a try as soon as one of my packages needs an update (which does not happen too often.)

juhp commented 2 years ago

However the push part for package parallel builds is not done yet.

For single package parallel branch building, it indeed would make sense to push them to bodhi too.)

+1. I was going to create a separate issue before I realize this was included here.

Yes, it would still be better to have a separate issue for it. But I will leave this issue open until then.

oturpe commented 2 years ago

Finally, a package of mine received an update. I processed it using fbrnch parallel -F -m, everything worked as expected.

I have created a separate issue #35 about Bodhi builds automation in this scenario.