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

Adding files when doing `fbrnch import` #47

Open LecrisUT opened 1 week ago

LecrisUT commented 1 week ago

For example when importing a rust package, you would want to include the rust2rpm.toml which is not included in the srpm. The issue is that adding this breaks the flow of fbrnch import. Ideally there could be an i (interactive) option that would spawn a bash environment where we do the necessary edits, and then when we exit, take over and continue the process.

juhp commented 1 week ago

Okay I think something like that should be possible: I have to look at the code to see what makes most sense

juhp commented 1 week ago

So actually there is already this prompt: Press Enter to push and build <n-v-r>, where it waits before push/build. So you can just hop into a shell (or Ctrl-z I suppose) and make your changes before proceeding. I admit that may not be completely obvious though... (Or at that point you can also just Ctrl-c and make your changes and then fbrnch build to push everything).

fbrnch tries to be flexible/lenient wherever it can: so things like build and parallel can be safely interrupted and re-run, even while those builds are on-going (also copr will support this in the next fbrnch release). (Of course there may be some particular commands where that is not true by necessity.)

juhp commented 1 week ago

(Eventually maybe the addition of rust2rpm.toml could be automated too perhaps even, though i don't really do rust packaging so it is a bit beyond me currently.)

LecrisUT commented 1 week ago

So actually there is already this prompt

Indeed, I was thinking to have it as options [y/n/i]

So you can just hop into a shell (or Ctrl-z I suppose) and make your changes before proceeding.

Oh didn't consider that, I'll give it a try.

(Eventually maybe the addition of rust2rpm.toml could be automated too perhaps even, though i don't really do rust packaging so it is a bit beyond me currently.)

There is no standard for this, but I usually include the rust2rpm.toml in the review comment. But there are even more complicated setups like including a packit workflow or tmt tests. Normally I have these configurations in the git repo I use for reviewing, but sometimes like the packit configuration I still need to manually adjust it for downstream.