You are not logged in.

#1 2021-04-23 05:36:35

oinkl
Member
Registered: 2010-01-13
Posts: 47

[SOLVED] Which branch does makepkg use with git sources?

My PKGBUILD stopped pulling the latest git source on Github. After investigation, I discovered the repo owner renamed main to master - master was pointing to an older commit, main was pointing to the most recent. makepkg was still using master by default. I can modify the git source to pull main with a branch fragment in the URL, but is makepkg configured to use master by default, or is it a git setting? Is this configurable?

Last edited by oinkl (2021-04-23 06:14:22)

Offline

#2 2021-04-23 06:14:13

oinkl
Member
Registered: 2010-01-13
Posts: 47

Re: [SOLVED] Which branch does makepkg use with git sources?

I solved it by deleting the previously downloaded git sources in the directory, which was still using the old default branch, and would just keep pulling that branch on update. After deleting and re-running makepkg, it used the new default branch, main.

Offline

#3 2022-12-18 07:20:07

adlai
Member
Registered: 2022-12-18
Posts: 1

Re: [SOLVED] Which branch does makepkg use with git sources?

One "defensive programming" approach would be to explicitly include some `git checkout <branch>` in the prepare() function, in case you wish to have more specificity than whatever the git server considers the default branch.

Last edited by adlai (2022-12-18 07:22:15)

Offline

#4 2022-12-18 11:59:23

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,443

Re: [SOLVED] Which branch does makepkg use with git sources?

adlai wrote:

One "defensive programming" approach would be to explicitly include some `git checkout <branch>` in the prepare() function, in case you wish to have more specificity than whatever the git server considers the default branch.

No, you read the man page or the VCS package guideslines in the wiki and specify the branch as part of the source.

Offline

Board footer

Powered by FluxBB