You are not logged in.
I want to cherry pick a pending PR in a git PKGBUILD. I believe one way to do it is to use the following in the prepare function:
git pull --no-rebase origin pull/19892/head
I am building with makechrootpkg and this throws an error relating to an unknown committer. What is the recommended way to fix?
...
From /startdir/xbmc
* branch refs/pull/19892/head -> FETCH_HEAD
Committer identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'builduser@sky.(none)')
==> ERROR: A failure occurred in prepare().
Aborting...
I could add this before the pull command, but perhaps there is a better way?
git config user.email "someone@somewhere.net"
Last edited by graysky (2021-06-20 13:40:07)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I have no better idea, but if you want you could extract the mail from the PACKAGER variable if it is set. (I do not see any practical use for that, though)
Edit: Or just set the env variable EMAIL or GIT_COMMITTER_EMAIL I think.
Last edited by progandy (2021-06-20 13:28:28)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I like the env variable suggestion. Neither of those two work however... according to https://git-scm.com/book/en/v2/Git-Inte … -Variables they should.
EDIT: my bad... this works, thanks!
EMAIL="someone@somewhere.net" git pull --no-rebase origin pull/19892/head
Last edited by graysky (2021-06-20 13:38:26)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
You should probably not be committing the results in prepare() as that changes the reported version from pkgver().
An alternative is git cherry-pick -n / --no-commit
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
You should probably not be committing the results in prepare() as that changes the reported version from pkgver().
An alternative is git cherry-pick -n / --no-commit
What is the syntax for cherry-pick when the target isn't a commit but is a PR number? Didn't see this in man git cherrypick.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
A "PR number" isn't something distinctively unique from a commit. A "PR number" is in fact a branch ref, and cherry-pick accepts branch refs and resolves one (1) commit from the tip of that branch, since that's how gitrevisions(7) works.
Your --no-rebase is trying to tell "git pull" to run the "git merge" machinery. git merge accepts --no-commit too, and git pull passes that option to git merge. If you do indeed need multiple commits, then merging instead of cherry-picking may make sense... the --no-commit option is understood by both.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Adding in the sources array the patch URL seems easier, no?
Then update the pkgsum or just SKIP it if it changes too frequently to bother.
Now it's straightforward to apply the patch
Last edited by icar (2021-06-20 17:00:51)
Offline
@icar - Yes, just wanted to learn too.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline