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
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

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,632

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.


pkgshackscfgblag

Offline

#5 Yesterday 07:31:38

weltio
Member
From: Germany
Registered: 2009-04-05
Posts: 90

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

I'm sorry to bump that old thread, but I have exactly the same question.
When I use that PKGBUILD mentioned above (with the fragment "branch=5.15", the following git command shows that dev is checked out, not 5.15

 git branch | grep -E '(\*|5.15$)'
  5.15
* dev

The man page states

fragment
(optional) Allows specifying a revision number or branch for makepkg to checkout from the VCS.

So I would assume the 5.15 branch will be checked out

Last edited by weltio (Yesterday 07:31:56)

Offline

#6 Yesterday 08:00:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,752

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

Following git command run where exactly?

Offline

#7 Yesterday 10:06:04

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,922

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

Weltio, please (re-)read necro-bumping .

Start a new thread and , link to this one and answer seth' question in the first post of the new thread.

Moderator Note
Closing this old thread.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB