You are not logged in.

#1 2020-11-12 13:12:36

BertiBoeller
Member
Registered: 2009-01-19
Posts: 58

[Solved] Checkout specific branch from Git repository does not work

I've wanted to build qt5-declarative-git  from AUR. makepkg is supposed to checkout the 5.15 branch but it always checks out the dev branch. Can somebody tell me what's wrong? Is there something wrong with the PKGBUILD or is there a bug in makepkg?

Last edited by BertiBoeller (2020-11-12 13:28:55)

Offline

#2 2020-11-12 13:19:30

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,993

Re: [Solved] Checkout specific branch from Git repository does not work

BertiBoeller wrote:

makepkg is supposed to checkout the 5.15 branch

What makes you think that? It's a -git package, it's meant to check out the latest version.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2020-11-12 13:30:44

BertiBoeller
Member
Registered: 2009-01-19
Posts: 58

Re: [Solved] Checkout specific branch from Git repository does not work

The bare checkout in $pkgdir/package_name will always point to the default branch. makepkg will checkout the correct branch when it clones the sources into the $srcdir/package_name folder.

Offline

#4 2020-11-12 14:57:37

ayekat
Member
Registered: 2011-01-17
Posts: 1,409
Website

Re: [Solved] Checkout specific branch from Git repository does not work

source=("git+https://code.qt.io/qt/qtdeclarative.git#branch=5.15")

BertiBoeller, the PKGBUILD will actually build the correct version. If you do `git show` within the source directory, you will see that the `makepkg` branch is the same as the `origin/5.15` branch.

The problem is that the pkgver() function returns a bogus version information because… it does awkward things. I don't know what the correct way to do it is, but it simply lists all known tags and picks the latest one, regardless of which branch it currently is in.


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

Board footer

Powered by FluxBB