Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#34586 - [pacman] The flaw in work with VCS (git)?
Attached to Project:
Arch Linux
Opened by Vladimir (_v_l) - Wednesday, 03 April 2013, 14:19 GMT
Last edited by Allan McRae (Allan) - Thursday, 04 April 2013, 06:01 GMT
Opened by Vladimir (_v_l) - Wednesday, 03 April 2013, 14:19 GMT
Last edited by Allan McRae (Allan) - Thursday, 04 April 2013, 06:01 GMT
|
DetailsLet's imagine that I have following directory structure
~/buildpkg/mupdf/ mupdf/ PKGBUILD for package 'mupdf-git', here 'mupdf/' is local clone of remote git repository. I use 'makepkg' in that directory to build 'mupdf-git' from fresh git 'HEAD'. In previous version of pacman (actually 'makepkg') I used to manually update local git repository to fresh 'HEAD' in 'PKGBUILD' (as it is recommended in PKGBUILD-git.proto). New pacman version, 4.1, deprecates the use of '_gitname' and '_gitroot' (they aren't mentioned in manual) and besides that it don't update 'pkgver' as version 4.0.3 did. I followed guide 'https://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines' ("... example of a Git PKGBUILD in pacman 4.1") and get rid of both variables, changed 'sources' and added 'pkgver' function. I expected that when I run 'makepkg' it would fetch changes from upstream (origin) and update repository. But I was wrong, according to 'makepkg' source (/usr/bin/makepkg), it did fetch changes but not update local repository, so following 'git clone' clones old data. As I understand the code this is intended but strange. Is that expected way to work? In contrast, bzr, svn both update they local repositories, while hg uses the same strategy as git. If I not fully wrong with my understanding of '-git' ('-bzr', '-svn', '-hg') packages idea, all local repositories (now this only concerns git and hg) have to be updated before any 'clone' operation. |
This task depends upon
Btw I just cloned expac to $srcdir/expac and building works fine.
~/.makepkg/src/$pkgname <-- bare git repo pulled in by makepkg (assuming the git repo is the same name as the package)
~/.makepkg/build/$pkgname/src/$pkgname <-- non-bare git repo cloned by makepkg for building purposes, also known as "$srcdir/$pkgname"
All of the building happens in ~/.makepkg/build, and the non-bare repo is automagically generated. This could have been made by a PKGBUILD with just a package function that goes
package () { cd "$srcdir/$pkgname" ; make install }
No build function, no cloning in the PKGBUILD, nothing special for git. It's extracted in exactly the same way (at least to your packages) as any normal source is.