eli-schwartz / aurpublish

PKGBUILD management framework for the Arch User Repository
GNU General Public License v2.0
246 stars 18 forks source link

[Question] Branches and rebasing? Git submodules #33

Closed enoryw closed 3 weeks ago

enoryw commented 3 weeks ago

I want to manage my modified PKGBUILDs based on upstream (from the AUR and other sources) so that when upstream changes I can rebase/merge my changes on it.

Is aurpublish or git subtrees compatible with this? aurpublish works on the the master branch only so I'm not able to differentiate between my modifications and also pull in the updates from upstream in the context of the parent repo. I can change the master branch of that subtree to the branch with my changes, but that requires working with the repo cloned somewhere else whenever i make updates. Looking into git subtrees, it doesn't seem like there is a way for subtrees to support this kind of workflow.

Would git submodules be a better solution for my use case? I tried it but what I would also like is not have remote repos for each of the PKGBUILDs and just depend on a master PKGBUILDs repo instead but I don't think this is possible since a submodule is a git repo itself and it's not like I can point to a local repo inside this master PGKBUILDs repo.

alerque commented 3 weeks ago

No. If you want to keep local modifications and keep rebasing them on upstream changes, then neither subtrees (as used by aurpublish) nor submodules are a viable solution. Subtrees can be coerced to work but you'd need to keep nuking the subtree, re-adding it, then cherry picking your changes on top. You're in for a world of hurt if you go down that road. Just don't.

Instead just write yourself some tooling to manage a group of individual repositories. Myrepos (mr) for example makes iterating and running standard functions and managing remotes over a whole directory of repos basically trivial. That sort of layout is going to be much more manageable for keeping modified forks up to date.