[aur-general] [AUR4] Is there a tool for using a single git repo for several packages?
Eli Schwartz
eschwartz93 at gmail.com
Thu Jun 11 00:49:49 UTC 2015
On Wed, Jun 10, 2015 at 6:35 PM, Marcel Korpel <marcel.korpel at gmail.com>
wrote:
> Thanks so much for these hooks. However, I'm not able to install them
> properly (as I think you intended to install them) and they don't work
> as I expected (but I'm not well-versed in git hooks at all).
>
> I cloned your repository, went to an AUR4 repo and issued
>
> $ ~/eli-schwartz/pkgbuilds/setup.sh hooks
>
> but links in .git/hooks were not created. Perhaps I erred (it's late
> already), so I just copied all files to the repository and issued
>
> $ ./setup.sh hooks
>
> Now links were created. If I'm not mistaken, I can make a change in
> PKGBUILD and
>
> $ git add PKGBUILD
> $ git commit
>
> Now my not-so-favourite editor popped up, asking for a commit message.
> As you have a prepare-commit-msg hook, a default message should have
> been created, but nothing is displayed (I expected the default
> message, that I could change to my liking). When I leave the commit
> message blank, the commit is aborted.
>
> How do I use these hooks and your setup script? In which directory
> should I run it? And are you sure that the test .*/PKGBUILD$ is
> correct? When I issue `git diff --name-only --cached`, I only get
> `PKGBUILD`, without a slash. (Well, you probably are correct, as you
> most likely test your hooks ;)
>
> Thanks again.
>
> Best, Marcel
>
My intent (see the README.md) is that the hooks,setup script, aurpublish
are all tracked within the repo, and that the repo is a single master
repo-to-rule-them-all. e.g. :
[eschwartz at arch ~/git/pkgbuilds]$ ls -p
aurpublish fanficfare/ git-extras/ kindletool-git/
pre-commit.hook README.md
calibre-installer/ fanficfare-git/ kindletool/ post-commit.hook
prepare-commit-msg.hook setup.sh
Each folder contains the PKGBUILD/.SRCINFO/other for a package, and each
folder is exported to the AUR using the `./aurpublish` script.
The way this works is through the git subtree mechanism -- see:
http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/
I prefer it this way, since I can keep a single repository mirrored on
GitHub, and because my previous attempt using submodules I regard as too
bulky.
My hooks therefore loop through all folders in the repo, and run mksrcinfo
on those. the prepare-commit-msg hook likewise does so.
However, if you are interested in my previous submodules method, checkout
the branch "submodules-base" in my repo, and take a look. Again, I intended
a single repo-to-rule-them-all, but this one is a git repo that streamlines
the process of adding and manipulating AUR4 clones as submodule repos --
that *might* be more to some peoples' liking.
-- Eli Schwartz
More information about the aur-general
mailing list