[aur-general] AUR4, git, subtrees ELI5?

Joost Bremmer toost.b at gmail.com
Tue Jun 16 23:00:52 UTC 2015


On 16 June 2015 at 14:44, Phillip Smith <fukawi2 at gmail.com> wrote:

> On 16 June 2015 at 14:26, Eli Schwartz <eschwartz93 at gmail.com> wrote:
> >
> > FWIW you can use filter-branch to run mksrcinfo on each folder in your
> > current aur-packages repo, then merge in my base branch and continue on
> as
> > before. Might have to resolve a conflict between our .gitignores, (I may
> be
> > biased but I prefer mine :-P ) but other than that it should work fine.
>
> Thanks for your ongoing interest -- I think I've royally screwed it
> all though.... Because I've submitted all my packages to AUR4 using
> individual (fresh) git repos, now I can't push using `aurpublish`
> because there's no common commits.
>
> I tried your 'adopt' option to aurpublish to pull the repo from the
> AUR server into my umbrella git repo, but still won't let me push:
>
>  ~/aur-packages $ ./aurpublish stenc
> git push using:  aur:/stenc.git master
> To aur:/stenc.git
>  ! [rejected]        89b88136c6e0b9bf70f0975ebebedd2a05c9f3fa ->
> master (non-fast-forward)
> error: failed to push some refs to 'aur:/stenc.git'
> hint: Updates were rejected because the tip of your current branch is
> behind
> hint: its remote counterpart. Integrate the remote changes (e.g.
> hint: 'git pull ...') before pushing again.
> hint: See the 'Note about fast-forwards' in 'git push --help' for details.
>
> ~/aur-packages $ git subtree pull -P stenc aur:/stenc.git master
> From aur:/stenc
>  * branch            master     -> FETCH_HEAD
> Already up-to-date.
>
>
> Thanks for you patience with my cluelessness with this!
>

I had the same same issue, didn't know about the recently added adopt
option, and fixed it by manually adding the packages using the subtree add
command.
Just init a fresh repo, then add your packages and run:

git subtree add -P stenc aur:/stenc.git master

Note that you'll have to make a bogus first commit (for git rev-parse as I
understand it), just an empty README.md will do, you can even remove it
after if you don't want it.

The subtree command will actually take care of all the rest, making a full
commit, retaining the full history of your package repo and everything
(which I'm wildly guessing using git subtree might miss? I just tested it
on a fresh git repo and it wouldn't even let me pull before adding).
After that aurpublish should run fine (it did for me).

Hopefully you don't have too many packages to be able to try this manually
comfortably!

Sincerely,
Joost Bremmer

"We apologize for the inconvenience"


More information about the aur-general mailing list