FS#36226 - [pacman-4.1] 'git clone --recursive' for source=()
Attached to Project:
Pacman
Opened by UnicornDarkness (Xorg) - Sunday, 21 July 2013, 15:06 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 21 July 2013, 16:41 GMT
Opened by UnicornDarkness (Xorg) - Sunday, 21 July 2013, 15:06 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 21 July 2013, 16:41 GMT
|
Details
Description:
«Pacman 4.1 supports the following VCS sources: bzr, git, hg and svn. See the fragment section of man PKGBUILD or PKGBUILD(5) for a list of supported VCS.» (URL : https://wiki.archlinux.org/index.php/Arch_CVS/SVN_PKGBUILD_guidelines#VCS_sources) In a PKGBUILD, when we use a git source in source=(), it doesn't clone submodules. Steps to reproduce: Command 'git clone' clone only one git repository. Command 'git clone --recursive' clone one git repository with all his submodules. Example : If you don't understand me, I've an example for you (it is not publicity for a project). 'git clone https://github.com/LubosD/darling.git'; will clone "darling". But 'git clone --recursive https://github.com/LubosD/darling.git'; will clone "darling", and repository git://github.com/LubosD/darling-mach.git into "darling/src/darling-mach" & git://git.dolezel.info/libsshcxx.git into "darling/src/darling-mach" Yes, it is possible to use 'git clone --recursive' in build(), but I thing it is deprecated (and not proper with Pacman 4.1). Or it's possible to add multiple git sources, like : source=('https://github.com/LubosD/darling.git' 'git://github.com/LubosD/darling-mach.git' 'git://git.dolezel.info/libsshcxx.git') And move them into the good path... BUT, if initial project changes his submodules, PKGBUILD will be broken. I think it can be useful for everybody who use git in source=(). Thanks in advance. |
This task depends upon
Closed by Dave Reisner (falconindy)
Sunday, 21 July 2013, 16:41 GMT
Reason for closing: Won't implement
Additional comments about closing: previously discussed: https://mailman.archlinux.org/pipermail/ pacman-dev/2013-March/016781.html
Sunday, 21 July 2013, 16:41 GMT
Reason for closing: Won't implement
Additional comments about closing: previously discussed: https://mailman.archlinux.org/pipermail/ pacman-dev/2013-March/016781.html
https://mailman.archlinux.org/pipermail/pacman-dev/2013-March/016781.html
So I have to use this :
prepare() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [[ -d "$_gitname" ]]; then
cd "$_gitname" && git pull origin
msg "The local files are updated."
else
git clone "$_gitroot" "$_gitname"
fi
msg "GIT checkout done or server timeout"
msg "Starting build..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
}
?