aura
aura copied to clipboard
use shallow clones
shallow clone *-git packages (using --depth=1) for faster cloning
- why?
- what use-cases are?
- wouldn't it break stuff?
- what are the alternatives (other AUR wrappers) doing?
This issues needs more info.
This may be a concern of makepkg, it's the thing that does the actual pulling of git sources. Here's an example. Notice that the calling of git clone isn't present anywhere in the PKGBUILD - makepkg handles this.
Otherwise, aura already does do a shallow git clone for all packages to get their PKGBUILDs and patch files before building.
- why?
faster cloning, take less disk space also, why not? packages are built from the source code of a specific commit i don't see the need to pull the history of the source code just to not use it in the building process
- what use-cases are?
having slow connection and/or limited bandwidth
- wouldn't it break stuff?
maybe, but it's not obvious to me
- what are the alternatives (other AUR wrappers) doing?
i don't know and i don't think it really matter
This may be a concern of
makepkg, it's the thing that does the actual pulling of git sources. Here's an example. Notice that the calling ofgit cloneisn't present anywhere in the PKGBUILD -makepkghandles this.Otherwise,
auraalready does do a shallow git clone for all packages to get their PKGBUILDs and patch files before building.
i think, when a repository is already cloned, makepkg does not re-clone it.
maybe this can be taken advantage of to allow aura to handle this part? (cloning repositories for makepkg)
i think at this point this is too much for aura to handle, and might even be considered out of scope for an aur helper
I'm going to look into makepkg and see if a patch is necessary there.
https://wiki.archlinux.org/index.php/User:Apg#makepkg:_shallow_git_clones
This was proposed and rejected (more than once) on pacman tracker https://wiki.archlinux.org/index.php/User:Apg#makepkg:_shallow_git_clones but there is a way which I've been using couple times https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8
(oops, was couple seconds too late)
@fosskers would it be acceptable to have a flag that would make aura wrap makepkg like this (or use this file instead of /usr/bin/makepkg, and let bash take care of overriding the git command):
https://gist.github.com/andrewgregory/770cbedfa2da3817d762483155a330b8
It would break any packages that make use of checkout in the pkgbuild.
yeah, its why i asked if it would be acceptable to have it under a flag (not a default behavior)
Yesterday I was probably drunk AF or something, and I mistook the issue to be a request for NOT doing recursive clones. Naturally, I felt surprised and wtf'ed about it.
I'm sorry, and I take my words (https://github.com/fosskers/aura/issues/690#issuecomment-771610305) back.
Since this is not a technical restriction of aura, but simply a matter of breaking weird PKGBUILDs at compile-time, I believe this feature would quite acceptable as an opt-in flag.
@Morganamilo Thanks for the link. Well the Arch devs might not like shallow cloning (they often prioritise "power user" scenarios, re: the first linked issue in the tracker), but I don't see why we shouldn't. Parsing the .SCINFO instead would be one way to fetch all the sources ahead of time. And indeed if done so, I don't think makepkg tries again (at least for tarballs). I can experiment with this.
If you choose to bypass makepkg with the source downloading then you'll have to handle #commit= #tag= ?siged and so on.
We will have to explore this as a new feature after the 4.0 release.